guix.scm 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ;;; Guile-zstd --- GNU Guile bindings to the zstd compression library.
  2. ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of Guile-zstd.
  5. ;;;
  6. ;;; Guile-zstd is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; Guile-zstd is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with Guile-zstd. If not, see <http://www.gnu.org/licenses/>.
  18. ;;; Package definition for GNU Guix.
  19. (use-modules (gnu) (guix)
  20. (guix licenses)
  21. (guix build-system gnu)
  22. (gnu packages pkg-config))
  23. (define (source? file stat)
  24. (and (not (string-suffix? "~" file))
  25. (not (string-suffix? ".go" file))
  26. (not (string-suffix? ".log" file))
  27. (not (string-suffix? ".trs" file))
  28. (not (member (basename file)
  29. '(".git" "autom4te.cache"
  30. "configure" "config.status" "config.log"
  31. "config.cache" "aclocal.m4"
  32. "Makefile" "Makefile.in")))))
  33. (define S specification->package)
  34. (package
  35. (name "guile-zstd")
  36. (version "0.1.0-git")
  37. (source (local-file (dirname (current-filename))
  38. (string-append name "-" version "-source")
  39. #:recursive? #t
  40. #:select? source?))
  41. (build-system gnu-build-system)
  42. (native-inputs
  43. `(("autoconf" ,(S "autoconf"))
  44. ("automake" ,(S "automake"))
  45. ("pkg-config" ,pkg-config) ;for cross-compilation support
  46. ,@(if (%current-target-system)
  47. `(("guile" ,(S "guile"))) ;for 'guild compile' and 'guile-3.0.pc'
  48. '())
  49. ("guile" ,(S "guile"))))
  50. (inputs
  51. `(("zstd" ,(S "zstd") "lib")
  52. ("guile" ,(S "guile"))))
  53. (synopsis "GNU Guile bindings to the zstd compression library")
  54. (description
  55. "This package provides a GNU Guile interface to the zstd (``zstandard'')
  56. compression library.")
  57. (home-page "https://notabug.org/guile-zstd/guile-zstd")
  58. (license gpl3+))