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') 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 6ce206cb92ba803de7ff05410787f18ea7d37bae Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 25 Jan 2014 17:22:53 +0100 Subject: Prefer local builds for "small" derivations. * gnu/system.scm (union, file-union, links): Pass #:local-build? #t to 'derivation-expression'. * guix/derivations.scm (imported-files, compiled-modules): Likewise. * guix/profiles.scm (profile-derivation): Likewise. --- gnu/system.scm | 11 +++++++---- guix/derivations.scm | 6 ++++-- guix/profiles.scm | 3 ++- 3 files changed, 13 insertions(+), 7 deletions(-) (limited to 'guix') diff --git a/gnu/system.scm b/gnu/system.scm index 6fd753f8fd..1b5ce7afc5 100644 --- a/gnu/system.scm +++ b/gnu/system.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. ;;; @@ -152,7 +152,8 @@ input tuples." #:system system #:inputs inputs #:modules '((guix build union)) - #:guile-for-build guile))) + #:guile-for-build guile + #:local-build? #t))) (define* (file-union files #:key (inputs '()) (name "file-union")) @@ -190,7 +191,8 @@ as an inputs; additional inputs, such as derivations, are taken from INPUTS." `(symlink ,target ,name))) files)) - #:inputs inputs)))) + #:inputs inputs + #:local-build? #t)))) (define (links inputs) "Return a directory with symbolic links to all of INPUTS. This is @@ -212,7 +214,8 @@ directories or regular files." (mlet %store-monad ((inputs (lower-inputs inputs))) (derivation-expression "links" builder - #:inputs inputs))) + #:inputs inputs + #:local-build? #t))) (define* (etc-directory #:key (locale "C") (timezone "Europe/Paris") diff --git a/guix/derivations.scm b/guix/derivations.scm index cc8e37c973..ae68bb1194 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -836,7 +836,8 @@ system, imported, and appears under FINAL-PATH in the resulting store path." (build-expression->derivation store name builder #:system system #:inputs files - #:guile-for-build guile))) + #:guile-for-build guile + #:local-build? #t))) (define* (imported-modules store modules #:key (name "module-import") @@ -902,7 +903,8 @@ they can refer to each other." (build-expression->derivation store name builder #:inputs `(("modules" ,module-drv)) #:system system - #:guile-for-build guile))) + #:guile-for-build guile + #:local-build? #t))) (define* (build-expression->derivation store name exp #:key diff --git a/guix/profiles.scm b/guix/profiles.scm index 1ff6c97f9f..c1fa8272ba 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -257,7 +257,8 @@ the given MANIFEST." ;; already valid. `((,name ,path) ,@deps))) (manifest-entries manifest)) - #:modules '((guix build union)))) + #:modules '((guix build union)) + #:local-build? #t)) (define (profile-regexp profile) "Return a regular expression that matches PROFILE's name and number." -- 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') 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') 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') 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') 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 3ca00bb51e3ff906a700b6925e0ce81558c8c469 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 28 Feb 2014 10:42:09 +0100 Subject: packages: Support 'patches' and 'snippets' for sources that are directories. * guix/packages.scm (patch-and-repack)[numeric-extension?, tarxz-name]: New procedures. [builder]: Adjust to deal with SOURCE when it's a directory. : Use 'tarxz-name'. Always add (guix build utils) to IMPORTED-MODULES. --- guix/packages.scm | 67 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 19 deletions(-) (limited to 'guix') diff --git a/guix/packages.scm b/guix/packages.scm index d345900f79..f2119bebce 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -315,6 +315,20 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (dash (string-index sans #\-))) (string-drop sans (+ 1 dash)))) + (define (numeric-extension? file-name) + ;; Return true if FILE-NAME ends with digits. + (string-every char-set:hex-digit (file-extension file-name))) + + (define (tarxz-name file-name) + ;; Return a '.tar.xz' file name based on FILE-NAME. + (let ((base (if (numeric-extension? file-name) + original-file-name + (file-sans-extension file-name)))) + (string-append base + (if (equal? (file-extension base) "tar") + ".xz" + ".tar.xz")))) + (define patch-inputs (map (lambda (number patch) (list (string-append "patch" (number->string number)) @@ -327,7 +341,8 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (define builder `(begin (use-modules (ice-9 ftw) - (srfi srfi-1)) + (srfi srfi-1) + (guix build utils)) (let ((out (assoc-ref %outputs "out")) (xz (assoc-ref %build-inputs "xz")) @@ -342,14 +357,28 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (format (current-error-port) "applying '~a'...~%" patch*) (zero? (system* patch "--batch" ,@flags "--input" patch*)))) + (define (first-file directory) + ;; Return the name of the first file in DIRECTORY. + (car (scandir directory + (lambda (name) + (not (member name '("." ".."))))))) + (setenv "PATH" (string-append xz "/bin" ":" decomp "/bin")) - (and (zero? (system* tar "xvf" source)) - (let ((directory (car (scandir "." - (lambda (name) - (not - (member name - '("." "..")))))))) + + ;; SOURCE may be either a directory or a tarball. + (and (if (file-is-directory? source) + (let* ((store (or (getenv "NIX_STORE") + "/nix/store")) + (len (+ 1 (string-length store))) + (base (string-drop source len)) + (dash (string-index base #\-)) + (directory (string-drop base (+ 1 dash)))) + (mkdir directory) + (copy-recursively source directory) + #t) + (zero? (system* tar "xvf" source))) + (let ((directory (first-file "."))) (format (current-error-port) "source is under '~a'~%" directory) (chdir directory) @@ -375,23 +404,23 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (zero? (system* tar "cvfa" out directory)))))))) - (let ((name (string-append (file-sans-extension original-file-name) - ".xz")) - (inputs (filter-map (match-lambda - ((name (? package? p)) - (and (member name (cons decompression-type - '("tar" "xz" "patch"))) - (list name - (package-derivation store p - system))))) - (or inputs (%standard-patch-inputs))))) + (let ((name (tarxz-name original-file-name)) + (inputs (filter-map (match-lambda + ((name (? package? p)) + (and (member name (cons decompression-type + '("tar" "xz" "patch"))) + (list name + (package-derivation store p + system))))) + (or inputs (%standard-patch-inputs)))) + (modules (delete-duplicates (cons '(guix build utils) modules)))) - (build-expression->derivation store name builder + (build-expression->derivation store name builder #:inputs `(("source" ,source) ,@inputs ,@patch-inputs) #:system system - #:modules imported-modules + #:modules modules #:guile-for-build guile-for-build))) (define* (package-source-derivation store source -- 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') 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