From db6190899ea15d3b66d6b2d82bdeaee442423100 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 17 Dec 2013 20:33:26 +0100 Subject: gnu: gnu-build-system: Add CC_FOR_BUILD to configure flags. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/build/gnu-build-system.scm: Add new configure flag: CC_FOR_BUILD=gcc * gnu/packages/gnupg.scm, gnu/packages/guile.scm, gnu/packages/make-bootstrap.scm: remove CC_FOR_BUILD from these package descriptions. Signed-off-by: Ludovic Courtès --- guix/build/gnu-build-system.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'guix/build') diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 65c9fcd1bd..6d26392c8f 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -136,7 +136,10 @@ makefiles." (bash (or (and=> (assoc-ref (or native-inputs inputs) "bash") (cut string-append <> "/bin/bash")) "/bin/sh")) - (flags `(,(string-append "CONFIG_SHELL=" bash) + (flags `(,@(if target ; cross building + '("CC_FOR_BUILD=gcc") + '()) + ,(string-append "CONFIG_SHELL=" bash) ,(string-append "SHELL=" bash) ,(string-append "--prefix=" prefix) "--enable-fast-install" ; when using Libtool -- cgit v1.2.3 From 65529e49ff5b9052544271b1b7923feed4312849 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 27 Jan 2014 23:45:59 +0100 Subject: build-system/gnu: Pass --localstatedir=/var --sharedstatedir=/com. Suggested by John Darrington and Mark H Weaver . * guix/build/gnu-build-system.scm (configure): Pass --localstatedir=/var --sharedstatedir=/com. * gnu/packages/admin.scm (dmd): Remove 'arguments' field. * gnu/packages/avahi.scm (avahi): Remove --localstatedir flag. * gnu/packages/glib.scm (dbus): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/pulseaudio.scm (pulseaudio): Likewise. --- gnu/packages/admin.scm | 2 -- gnu/packages/avahi.scm | 3 +-- gnu/packages/glib.scm | 5 +---- gnu/packages/package-management.scm | 3 +-- gnu/packages/pulseaudio.scm | 2 +- guix/build/gnu-build-system.scm | 8 +++++++- 6 files changed, 11 insertions(+), 12 deletions(-) (limited to 'guix/build') diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index dfbf20d56f..9520cab2d5 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -51,8 +51,6 @@ "07mddw0p62fcphwjzgb6rfa0pjz5sy6jzbha0sm2vc3rqf459jxg")) (patches (list (search-patch "dmd-getpw.patch"))))) (build-system gnu-build-system) - (arguments - '(#:configure-flags '("--localstatedir=/var"))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-2.0))) (synopsis "Daemon managing daemons") diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index bc70878d46..d1023cd4b6 100644 --- a/gnu/packages/avahi.scm +++ b/gnu/packages/avahi.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2013, 2014 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,7 +44,6 @@ (build-system gnu-build-system) (arguments '(#:configure-flags '("--with-distro=none" - "--localstatedir=/var" ; for the DBus socket "--disable-python" "--disable-mono" "--disable-doxygen-doc" diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 0560915b24..adaa8aa3aa 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -67,10 +67,7 @@ (patches (list (search-patch "dbus-localstatedir.patch"))))) (build-system gnu-build-system) (arguments - '(#:configure-flags (list ;; Install the system bus socket under /var. - "--localstatedir=/var" - - ;; XXX: Fix the following to allow system-wide + '(#:configure-flags (list ;; XXX: Fix the following to allow system-wide ;; config. ;; "--sysconfdir=/etc" diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index f94f8fc919..cee372e81c 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2013, 2014 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,7 +43,6 @@ (build-system gnu-build-system) (arguments `(#:configure-flags (list - "--localstatedir=/var" (string-append "--with-libgcrypt-prefix=" (assoc-ref %build-inputs "libgcrypt"))) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index 8bf48c2a89..859e1d6bca 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -148,7 +148,7 @@ parse JSON formatted strings back into the C representation of JSON objects.") "pulseaudio-volume-test.patch"))))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--localstatedir=/var" ;"--sysconfdir=/etc" + `(#:configure-flags '(;;"--sysconfdir=/etc" "--disable-oss-output") #:phases (alist-cons-before 'check 'pre-check diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 6d26392c8f..ed870ade88 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -142,6 +142,12 @@ makefiles." ,(string-append "CONFIG_SHELL=" bash) ,(string-append "SHELL=" bash) ,(string-append "--prefix=" prefix) + + ;; Keep modifiable state directories outside of the + ;; store (Autoconf 2.70 will add '--runstatedir'.) + "--localstatedir=/var" + "--sharedstatedir=/com" + "--enable-fast-install" ; when using Libtool ;; Produce multiple outputs when specific output names -- cgit v1.2.3 From 49a8b80da63a50a1ca3a6b8c14c21b362177dc9f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 28 Jan 2014 08:57:37 +0100 Subject: Revert "build-system/gnu: Pass --localstatedir=/var --sharedstatedir=/com." This reverts commit 65529e49ff5b9052544271b1b7923feed4312849. --- gnu/packages/admin.scm | 2 ++ gnu/packages/avahi.scm | 3 ++- gnu/packages/glib.scm | 5 ++++- gnu/packages/package-management.scm | 3 ++- gnu/packages/pulseaudio.scm | 2 +- guix/build/gnu-build-system.scm | 8 +------- 6 files changed, 12 insertions(+), 11 deletions(-) (limited to 'guix/build') diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 9520cab2d5..dfbf20d56f 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -51,6 +51,8 @@ "07mddw0p62fcphwjzgb6rfa0pjz5sy6jzbha0sm2vc3rqf459jxg")) (patches (list (search-patch "dmd-getpw.patch"))))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--localstatedir=/var"))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-2.0))) (synopsis "Daemon managing daemons") diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index d1023cd4b6..bc70878d46 100644 --- a/gnu/packages/avahi.scm +++ b/gnu/packages/avahi.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès +;;; Copyright © 2013 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,6 +44,7 @@ (build-system gnu-build-system) (arguments '(#:configure-flags '("--with-distro=none" + "--localstatedir=/var" ; for the DBus socket "--disable-python" "--disable-mono" "--disable-doxygen-doc" diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index adaa8aa3aa..0560915b24 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -67,7 +67,10 @@ (patches (list (search-patch "dbus-localstatedir.patch"))))) (build-system gnu-build-system) (arguments - '(#:configure-flags (list ;; XXX: Fix the following to allow system-wide + '(#:configure-flags (list ;; Install the system bus socket under /var. + "--localstatedir=/var" + + ;; XXX: Fix the following to allow system-wide ;; config. ;; "--sysconfdir=/etc" diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index cee372e81c..f94f8fc919 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès +;;; Copyright © 2013 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,6 +43,7 @@ (build-system gnu-build-system) (arguments `(#:configure-flags (list + "--localstatedir=/var" (string-append "--with-libgcrypt-prefix=" (assoc-ref %build-inputs "libgcrypt"))) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index 859e1d6bca..8bf48c2a89 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -148,7 +148,7 @@ parse JSON formatted strings back into the C representation of JSON objects.") "pulseaudio-volume-test.patch"))))) (build-system gnu-build-system) (arguments - `(#:configure-flags '(;;"--sysconfdir=/etc" + `(#:configure-flags '("--localstatedir=/var" ;"--sysconfdir=/etc" "--disable-oss-output") #:phases (alist-cons-before 'check 'pre-check diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index ed870ade88..6d26392c8f 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014 Ludovic Courtès +;;; Copyright © 2012, 2013 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -142,12 +142,6 @@ makefiles." ,(string-append "CONFIG_SHELL=" bash) ,(string-append "SHELL=" bash) ,(string-append "--prefix=" prefix) - - ;; Keep modifiable state directories outside of the - ;; store (Autoconf 2.70 will add '--runstatedir'.) - "--localstatedir=/var" - "--sharedstatedir=/com" - "--enable-fast-install" ; when using Libtool ;; Produce multiple outputs when specific output names -- cgit v1.2.3 From c2e65167212f15093f672ebc49f3f7d4a51fcd2b Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 10 Feb 2014 21:35:30 +0100 Subject: build-system/gnu: Set the docdir to "share/doc" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/build/gnu-build-system.scm (configure): Change docdir directory from "doc" to "share/doc". Signed-off-by: Ludovic Courtès --- guix/build/gnu-build-system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix/build') diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 6d26392c8f..4cda7fc11a 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -163,7 +163,7 @@ makefiles." '()) ,@(if docdir (list (string-append "--docdir=" docdir - "/doc/" (package-name))) + "/share/doc/" (package-name))) '()) ,@(if target ; cross building (list (string-append "--host=" target)) -- cgit v1.2.3 From 17919a58012c38052133ed029450fdb98d01fb5c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 22 Feb 2014 00:34:49 +0100 Subject: build-system/gnu: Allow the source to be a directory. * guix/build/gnu-build-system.scm (unpack): Check if SOURCE is a directory, and copy it locally if it is. * gnu/packages/libwebsockets.scm (libwebsockets)[arguments]: Remove 'unpack' phase. --- gnu/packages/libwebsockets.scm | 22 ++++++---------------- guix/build/gnu-build-system.scm | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 19 deletions(-) (limited to 'guix/build') diff --git a/gnu/packages/libwebsockets.scm b/gnu/packages/libwebsockets.scm index 3f900aef72..65aa174355 100644 --- a/gnu/packages/libwebsockets.scm +++ b/gnu/packages/libwebsockets.scm @@ -50,22 +50,12 @@ (build-system gnu-build-system) (arguments - '(#:phases (alist-replace - 'unpack - ;; FIXME: Remove this when gnu-build-system handles that - ;; case correctly. - (lambda* (#:key source #:allow-other-keys) - (mkdir "source") - (chdir "source") - (copy-recursively source ".") - #t) - - (alist-cons-before - 'configure 'bootstrap - (lambda _ - (chmod "libwebsockets-api-doc.html" #o666) - (zero? (system* "./autogen.sh"))) - %standard-phases)))) + '(#:phases (alist-cons-before + 'configure 'bootstrap + (lambda _ + (chmod "libwebsockets-api-doc.html" #o666) + (zero? (system* "./autogen.sh"))) + %standard-phases))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool "bin") diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 4cda7fc11a..da6b31c326 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -90,8 +90,17 @@ #t) (define* (unpack #:key source #:allow-other-keys) - (and (zero? (system* "tar" "xvf" source)) - (chdir (first-subdirectory ".")))) + "Unpack SOURCE in the working directory, and change directory within the +source. When SOURCE is a directory, copy it in a sub-directory of the current +working directory." + (if (file-is-directory? source) + (begin + (mkdir "source") + (chdir "source") + (copy-recursively source ".") + #t) + (and (zero? (system* "tar" "xvf" source)) + (chdir (first-subdirectory "."))))) (define* (patch-source-shebangs #:key source #:allow-other-keys) "Patch shebangs in all source files; this includes non-executable -- cgit v1.2.3 From 8be3b8a39bae9ffaccf3c9a71104d67e73948b20 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 10 Mar 2014 23:51:31 +0100 Subject: Change default store values from /nix/store to /gnu/store. * gnu/packages/ld-wrapper.scm (%store-directory): Change the default to /gnu/store. * guix/build/utils.scm (%store-directory): New procedure. (remove-store-references): Use it for the default value of 'store'. * guix/packages.scm (patch-and-repack)[builder]: Change default store to /gnu/store. --- gnu/packages/ld-wrapper.scm | 4 ++-- guix/build/utils.scm | 15 ++++++++++----- guix/packages.scm | 3 +-- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'guix/build') diff --git a/gnu/packages/ld-wrapper.scm b/gnu/packages/ld-wrapper.scm index 41ff3df986..d3eb083f2f 100644 --- a/gnu/packages/ld-wrapper.scm +++ b/gnu/packages/ld-wrapper.scm @@ -11,7 +11,7 @@ main="(@ (gnu build-support ld-wrapper) ld-wrapper)" exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" "$@" !# ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,7 +63,7 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" " (define %store-directory ;; File name of the store. - (or (getenv "NIX_STORE") "/nix/store")) + (or (getenv "NIX_STORE") "/gnu/store")) (define %temporary-directory ;; Temporary directory. diff --git a/guix/build/utils.scm b/guix/build/utils.scm index a37ace31af..40af785b88 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov ;;; @@ -29,7 +29,8 @@ #:use-module (rnrs io ports) #:re-export (alist-cons alist-delete) - #:export (directory-exists? + #:export (%store-directory + directory-exists? executable-file? call-with-ascii-input-file with-directory-excursion @@ -62,6 +63,11 @@ ;;; Directories. ;;; +(define (%store-directory) + "Return the directory name of the store." + (or (getenv "NIX_STORE") + "/gnu/store")) + (define (directory-exists? dir) "Return #t if DIR exists and is a directory." (let ((s (stat dir #f))) @@ -443,7 +449,7 @@ all subject to the substitutions." ;;; -;;; Patching shebangs---e.g., /bin/sh -> /nix/store/xyz...-bash/bin/sh. +;;; Patching shebangs---e.g., /bin/sh -> /gnu/store/xyz...-bash/bin/sh. ;;; (define* (dump-port in out @@ -630,8 +636,7 @@ for each unmatched character." (unmatched (car matched) result))))))) (define* (remove-store-references file - #:optional (store (or (getenv "NIX_STORE") - "/nix/store"))) + #:optional (store (%store-directory))) "Remove from FILE occurrences of file names in STORE; return #t when store paths were encountered in FILE, #f otherwise. This procedure is known as `nuke-refs' in Nixpkgs." diff --git a/guix/packages.scm b/guix/packages.scm index f2119bebce..812d6bb991 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -368,8 +368,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." ;; SOURCE may be either a directory or a tarball. (and (if (file-is-directory? source) - (let* ((store (or (getenv "NIX_STORE") - "/nix/store")) + (let* ((store (or (getenv "NIX_STORE") "/gnu/store")) (len (+ 1 (string-length store))) (base (string-drop source len)) (dash (string-index base #\-)) -- cgit v1.2.3