gnu: fish: Update to 2.7.1.
[jackhill/guix/guix.git] / gnu / packages / attr.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
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 attr)
21 #:use-module (guix licenses)
22 #:use-module (gnu packages perl)
23 #:use-module (gnu packages gettext)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu))
27
28 (define-public attr
29 (package
30 (name "attr")
31 (version "2.4.47")
32 (source (origin
33 (method url-fetch)
34 (uri (string-append "mirror://savannah/attr/attr-"
35 version ".src.tar.gz"))
36 (sha256
37 (base32
38 "0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5"))))
39 (build-system gnu-build-system)
40 (arguments
41 `(#:phases
42 (modify-phases %standard-phases
43 (add-after 'configure 'patch-makefile-SHELL
44 (lambda _
45 (patch-makefile-SHELL "include/buildmacros")))
46 (replace 'install
47 (lambda _
48 (zero? (system* "make"
49 "install"
50 "install-lib"
51 "install-dev"))))
52 (replace 'check
53 (lambda* (#:key target #:allow-other-keys)
54 ;; Use the right shell.
55 (substitute* "test/run"
56 (("/bin/sh")
57 (which "sh")))
58
59 ;; When building natively, run the tests.
60 (unless target
61 (system* "make" "tests" "-C" "test"))
62
63 ;; XXX: Ignore the test result since this is
64 ;; dependent on the underlying file system.
65 #t)))))
66 (inputs
67 ;; Perl is needed to run tests; remove it from cross builds.
68 (if (%current-target-system)
69 '()
70 `(("perl" ,perl))))
71 (native-inputs
72 `(("gettext" ,gettext-minimal)))
73
74 (home-page "http://savannah.nongnu.org/projects/attr/")
75 (synopsis "Library and tools for manipulating extended attributes")
76 (description
77 "Portable library and tools for manipulating extended attributes.")
78 (license (list gpl2+ lgpl2.1+))))