gnu: rust-xdg-2: Drop minor version from variable name.
[jackhill/guix/guix.git] / gnu / packages / acl.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
8 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages acl)
26 #:use-module (guix licenses)
27 #:use-module (gnu packages attr)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages hurd)
30 #:use-module (gnu packages gettext)
31 #:use-module (gnu packages perl)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (gnu packages)
35 #:use-module (guix build-system gnu))
36
37 (define-public acl
38 (package
39 (name "acl")
40 (version "2.2.53")
41 (source
42 (origin
43 (method url-fetch)
44 (uri (string-append "mirror://savannah/acl/acl-"
45 version ".tar.gz"))
46 (sha256
47 (base32
48 "1ir6my3w74s6nfbgbqgzj6w570sn0qjf3524zx8xh67lqrjrigh6"))))
49 (build-system gnu-build-system)
50 (arguments
51 `(#:modules ((ice-9 ftw)
52 ,@%gnu-build-system-modules)
53 #:configure-flags '("--disable-static")
54 #:tests? ,(not (or (%current-target-system)
55 (hurd-target?)))
56 #:phases
57 (modify-phases %standard-phases
58 ;; XXX After repacking the sources the timestamps are reset to the
59 ;; epoch, which leads to a failure in gzipping the CHANGES file.
60 (add-after 'unpack 'ensure-no-mtimes-pre-1980
61 (lambda _
62 (let ((early-1980 315619200)) ; 1980-01-02 UTC
63 (ftw "." (lambda (file stat flag)
64 (unless (<= early-1980 (stat:mtime stat))
65 (utime file early-1980 early-1980))
66 #t))
67 #t)))
68 (add-after 'build 'patch-exec-bin-sh
69 (lambda _
70 (substitute* "test/run"
71 (("/bin/sh") (which "sh")))
72 #t))
73 (add-before 'check 'patch-tests
74 (lambda _
75 ;; The coreutils do not have an ACL bit to remove from their
76 ;; output, so the sed expression that removes the bit is disabled.
77 (substitute* "test/sbits-restore.test"
78 (("\\| sed.*'") ""))
79 ;; These tests require the existence of a user named "bin", but
80 ;; this user does not exist within Guix's build environment.
81 (substitute* "Makefile.in"
82 ((".*test/misc\\.test.*") "")
83 ((".*test/cp\\.test.*") "")
84 ((".*test/setfacl-X\\.test.*") ""))
85 #t)))))
86 (inputs `(("attr" ,attr)))
87 (native-inputs
88 `(("gettext" ,gettext-minimal)
89 ("perl" ,perl)))
90 (home-page "https://savannah.nongnu.org/projects/acl")
91 (synopsis
92 "Library and tools for manipulating access control lists")
93 (description
94 "Library and tools for manipulating access control lists.")
95 (license (list gpl2+ lgpl2.1+))))