;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
(define-public moreutils
(package
(name "moreutils")
- (version "0.58")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "mirror://debian/pool/main/m/moreutils/moreutils_"
- version ".orig.tar.gz"))
- (sha256
- (base32
- "02n00vqp6jxbxr5v3rdjxmzp6kxxjdkjgcclam6wrw8qamsbljww"))))
+ (version "0.64")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (list
+ (string-append
+ "https://git.joeyh.name/index.cgi/moreutils.git/snapshot/"
+ name "-" version ".tar.gz")
+ (string-append
+ "http://drabczyk.org/"
+ name "-" version ".tar.gz")))
+ (sha256
+ (base32 "1v3hazb9i5y6b3vx4giiszvc2zk2pjjvq88xlk1maasw5ia07lpy"))))
(build-system gnu-build-system)
- (inputs `(("perl" ,perl)
- ("libxml2" ,libxml2)
- ("libxslt" ,libxslt)
- ("docbook-xml" ,docbook-xml-4.4)
- ("docbook-xsl" ,docbook-xsl)))
+ ;; For building the manual pages.
+ (native-inputs
+ `(("docbook-xml" ,docbook-xml-4.4)
+ ("docbook-xsl" ,docbook-xsl)
+ ("libxml2" ,libxml2)
+ ("libxslt" ,libxslt)))
+ (inputs
+ `(("perl" ,perl)
+ ("perl-timedate" ,perl-timedate)
+ ("perl-time-duration" ,perl-time-duration)))
(arguments
`(#:phases
(modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key inputs #:allow-other-keys)
- (use-modules (srfi srfi-1))
- (substitute* "Makefile"
- (("/usr/share/xml/.*/docbook.xsl")
- (let* ((docbook-xsl (assoc-ref inputs "docbook-xsl"))
- (files (find-files docbook-xsl "^docbook\\.xsl$")))
- (find (lambda (file)
- (string-suffix? "/manpages/docbook.xsl" file))
- files)))))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (wrap-program
+ (string-append out "/bin/ts")
+ `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
+ #t))
+ (delete 'configure)) ; no configure script
#:make-flags
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ (string-append "DOCBOOKXSL="
+ (assoc-ref %build-inputs "docbook-xsl") "/xml/xsl/"
+ ,(package-name docbook-xsl) "-"
+ ,(package-version docbook-xsl))
"CC=gcc")))
- (home-page "http://joeyh.name/code/moreutils/")
+ (home-page "https://joeyh.name/code/moreutils/")
(synopsis "Miscellaneous general-purpose command-line tools")
(description
"Moreutils is a collection of general-purpose command-line tools to