guix.scm 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ;;; guix.scm -- Guix package definition
  2. (use-modules
  3. (guix git-download)
  4. (guix download)
  5. (guix packages)
  6. (guix utils)
  7. (guix gexp)
  8. (gnu packages)
  9. (gnu packages autotools)
  10. (gnu packages gettext)
  11. (gnu packages gnunet)
  12. (gnu packages image)
  13. (gnu packages texinfo)
  14. (srfi srfi-1)
  15. (ice-9 popen)
  16. (ice-9 rdelim))
  17. (define %source-dir (dirname (dirname (current-filename))))
  18. (define %git-commit
  19. (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ)))
  20. (define-public gnunet-git
  21. (package
  22. (inherit gnunet)
  23. (name "gnunet")
  24. (version (git-version (package-version gnunet) "HEAD" %git-commit))
  25. (source (local-file %source-dir #:recursive? #t))
  26. (inputs
  27. `(("libjpeg" ,libjpeg)
  28. ,@(package-inputs gnunet)))
  29. (native-inputs
  30. `(("autoconf" ,autoconf)
  31. ("automake" ,automake)
  32. ("gettext" ,gnu-gettext)
  33. ("libtool" ,libtool)
  34. ("texinfo" ,texinfo)
  35. ("which" ,(@ (gnu packages base) which))
  36. ,@(package-native-inputs gnunet)))
  37. (arguments
  38. (substitute-keyword-arguments (package-arguments gnunet)
  39. ((#:phases phases)
  40. `(modify-phases ,phases
  41. (add-after 'unpack 'make-po-directory-writable
  42. (lambda _
  43. (for-each make-file-writable
  44. (find-files "po" "."))
  45. #t))))))))
  46. gnunet-git