Merge remote-tracking branch 'origin/master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / moreutils.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages moreutils)
21 #:use-module ((guix licenses) #:prefix l:)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages perl)
26 #:use-module (gnu packages xml)
27 #:use-module (gnu packages docbook))
28
29 (define-public moreutils
30 (package
31 (name "moreutils")
32 (version "0.58")
33 (source (origin
34 (method url-fetch)
35 (uri (list
36 (string-append
37 "mirror://debian/pool/main/m/moreutils/moreutils_"
38 version ".orig.tar.gz")
39 ;; The main Debian mirrors only hold the current packages
40 (string-append
41 "http://snapshot.debian.org/archive/debian/20160304T165744Z"
42 "/pool/main/m/moreutils/moreutils_0.58.orig.tar.gz")))
43 (sha256
44 (base32
45 "02n00vqp6jxbxr5v3rdjxmzp6kxxjdkjgcclam6wrw8qamsbljww"))))
46 (build-system gnu-build-system)
47 (inputs `(("perl" ,perl)
48 ("libxml2" ,libxml2)
49 ("libxslt" ,libxslt)
50 ("docbook-xml" ,docbook-xml-4.4)
51 ("docbook-xsl" ,docbook-xsl)))
52 (arguments
53 `(#:phases
54 (modify-phases %standard-phases
55 (replace 'configure
56 (lambda* (#:key inputs #:allow-other-keys)
57 (use-modules (srfi srfi-1))
58 (substitute* "Makefile"
59 (("/usr/share/xml/.*/docbook.xsl")
60 (let* ((docbook-xsl (assoc-ref inputs "docbook-xsl"))
61 (files (find-files docbook-xsl "^docbook\\.xsl$")))
62 (find (lambda (file)
63 (string-suffix? "/manpages/docbook.xsl" file))
64 files)))))))
65 #:make-flags
66 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
67 "CC=gcc")))
68 (home-page "http://joeyh.name/code/moreutils/")
69 (synopsis "Miscellaneous general-purpose command-line tools")
70 (description
71 "Moreutils is a collection of general-purpose command-line tools to
72 augment the traditional Unix toolbox.")
73 (license l:gpl2+)))