diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-03-10 23:51:31 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-03-10 23:54:27 +0100 |
commit | 8be3b8a39bae9ffaccf3c9a71104d67e73948b20 (patch) | |
tree | fd1deee8449274908f6c2147d5df00b975ee4b68 /guix/build/utils.scm | |
parent | e06f7865e2630494a522ac32b9c0a0311be3e1e2 (diff) | |
download | gnu-guix-8be3b8a39bae9ffaccf3c9a71104d67e73948b20.tar gnu-guix-8be3b8a39bae9ffaccf3c9a71104d67e73948b20.tar.gz |
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.
Diffstat (limited to 'guix/build/utils.scm')
-rw-r--r-- | guix/build/utils.scm | 15 |
1 files changed, 10 insertions, 5 deletions
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 <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; @@ -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." |