From 9795f128c92695f7dabacf9696d0ba46e461f6ae Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 16 Oct 2023 08:28:12 +0200 Subject: contrib: move guix packages to pckages folder --- contrib/packages/guix/guix.README | 29 ++++++++++++++++++++++ contrib/packages/guix/guix.scm | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 contrib/packages/guix/guix.README create mode 100644 contrib/packages/guix/guix.scm (limited to 'contrib/packages/guix') diff --git a/contrib/packages/guix/guix.README b/contrib/packages/guix/guix.README new file mode 100644 index 000000000..1e8bd3126 --- /dev/null +++ b/contrib/packages/guix/guix.README @@ -0,0 +1,29 @@ +guix.scm contains Guix package definitions that can be used to +override the ones found in Guix's GNU distribution. + +Guix packagers are encouraged to adopt and adjust these definitions. + +GNUnet developers can use this for easily setting up a development or +test environment using Guix. + +When using the package definition for building a package this will +pick up the current development code. The version of the resulting +package is the output of 'git describe --tags'. + +To make guix build the development package defined here, use the +following command: + + guix build -f /contrib/guix + +To spawn a (development) environment with GNUnet's dependencies +installed, run: + + guix environment --load-path=/contrib/guix.scm + +To spawn a (test) environment with GNUnet available in this +environment, run: + + guix environment --load-path=/contrib/guix.scm --ad-hoc guix + +It is recommended to also pass the '--pure' option to guix, to make +sure the environment is not polluted with existing packages. diff --git a/contrib/packages/guix/guix.scm b/contrib/packages/guix/guix.scm new file mode 100644 index 000000000..4376d1ef5 --- /dev/null +++ b/contrib/packages/guix/guix.scm @@ -0,0 +1,51 @@ +;;; guix.scm -- Guix package definition + +(use-modules + (guix git-download) + (guix download) + (guix packages) + (guix utils) + (guix gexp) + (gnu packages) + (gnu packages autotools) + (gnu packages gettext) + (gnu packages gnunet) + (gnu packages image) + (gnu packages texinfo) + (srfi srfi-1) + (ice-9 popen) + (ice-9 rdelim)) + +(define %source-dir (dirname (dirname (current-filename)))) + +(define %git-commit + (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))) + +(define-public gnunet-git + (package + (inherit gnunet) + (name "gnunet") + (version (git-version (package-version gnunet) "HEAD" %git-commit)) + (source (local-file %source-dir #:recursive? #t)) + (inputs + `(("libjpeg" ,libjpeg) + ,@(package-inputs gnunet))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gettext" ,gnu-gettext) + ("libtool" ,libtool) + ("texinfo" ,texinfo) + ("which" ,(@ (gnu packages base) which)) + ,@(package-native-inputs gnunet))) + (arguments + (substitute-keyword-arguments (package-arguments gnunet) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'make-po-directory-writable + (lambda _ + (for-each make-file-writable + (find-files "po" ".")) + #t)))))))) + +gnunet-git -- cgit v1.2.3