attr.scm 2.8 KB

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