gnu: nnn: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / attr.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
20c620d0 3;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
812cee6a 4;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
3d282f90 5;;;
233e7676 6;;; This file is part of GNU Guix.
3d282f90 7;;;
233e7676 8;;; GNU Guix is free software; you can redistribute it and/or modify it
3d282f90
NK
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
233e7676 13;;; GNU Guix is distributed in the hope that it will be useful, but
3d282f90
NK
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
233e7676 19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
3d282f90 20
1ffa7090 21(define-module (gnu packages attr)
4a44e743 22 #:use-module (guix licenses)
1ffa7090 23 #:use-module (gnu packages perl)
1dba6407 24 #:use-module (gnu packages gettext)
3d282f90
NK
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu))
28
29(define-public attr
30 (package
31 (name "attr")
195f557e 32 (version "2.4.47")
20c620d0
LC
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "mirror://savannah/attr/attr-"
36 version ".src.tar.gz"))
37 (sha256
38 (base32
195f557e 39 "0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5"))))
3d282f90
NK
40 (build-system gnu-build-system)
41 (arguments
42 `(#:phases
20c620d0
LC
43 (modify-phases %standard-phases
44 (add-after 'configure 'patch-makefile-SHELL
45 (lambda _
812cee6a
MW
46 (patch-makefile-SHELL "include/buildmacros")
47 #t))
20c620d0
LC
48 (replace 'install
49 (lambda _
812cee6a
MW
50 (invoke "make"
51 "install"
52 "install-lib"
53 "install-dev")))
20c620d0
LC
54 (replace 'check
55 (lambda* (#:key target #:allow-other-keys)
56 ;; Use the right shell.
57 (substitute* "test/run"
58 (("/bin/sh")
370522b8 59 (which "sh")))
3d282f90 60
20c620d0 61 ;; When building natively, run the tests.
812cee6a
MW
62 ;;
63 ;; Note that we use system* and unconditionally return #t here
64 ;; to ignore the test result, because the tests will fail when
65 ;; the build is performed on a file system without support for
66 ;; extended attributes, and we wish to allow Guix to be built
67 ;; on such systems.
20c620d0
LC
68 (unless target
69 (system* "make" "tests" "-C" "test"))
20c620d0 70 #t)))))
ee268206
LC
71 (inputs
72 ;; Perl is needed to run tests; remove it from cross builds.
2a552f11 73 (if (%current-target-system)
ee268206
LC
74 '()
75 `(("perl" ,perl))))
76 (native-inputs
b94a6ca0 77 `(("gettext" ,gettext-minimal)))
2a552f11 78
340978d7 79 (home-page "https://savannah.nongnu.org/projects/attr/")
2a552f11 80 (synopsis "Library and tools for manipulating extended attributes")
3d282f90
NK
81 (description
82 "Portable library and tools for manipulating extended attributes.")
38bbd61d 83 (license (list gpl2+ lgpl2.1+))))