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.
This commit is contained in:
Ludovic Courtès 2014-03-10 23:51:31 +01:00
parent e06f7865e2
commit 8be3b8a39b
3 changed files with 13 additions and 9 deletions

View File

@ -11,7 +11,7 @@ main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" "$@" exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" "$@"
!# !#
;;; GNU Guix --- Functional package management for GNU ;;; 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>
;;; ;;;
;;; This file is part of GNU Guix. ;;; 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 (define %store-directory
;; File name of the store. ;; File name of the store.
(or (getenv "NIX_STORE") "/nix/store")) (or (getenv "NIX_STORE") "/gnu/store"))
(define %temporary-directory (define %temporary-directory
;; Temporary directory. ;; Temporary directory.

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; 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 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; ;;;
@ -29,7 +29,8 @@
#:use-module (rnrs io ports) #:use-module (rnrs io ports)
#:re-export (alist-cons #:re-export (alist-cons
alist-delete) alist-delete)
#:export (directory-exists? #:export (%store-directory
directory-exists?
executable-file? executable-file?
call-with-ascii-input-file call-with-ascii-input-file
with-directory-excursion with-directory-excursion
@ -62,6 +63,11 @@
;;; Directories. ;;; Directories.
;;; ;;;
(define (%store-directory)
"Return the directory name of the store."
(or (getenv "NIX_STORE")
"/gnu/store"))
(define (directory-exists? dir) (define (directory-exists? dir)
"Return #t if DIR exists and is a directory." "Return #t if DIR exists and is a directory."
(let ((s (stat dir #f))) (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 (define* (dump-port in out
@ -630,8 +636,7 @@ for each unmatched character."
(unmatched (car matched) result))))))) (unmatched (car matched) result)))))))
(define* (remove-store-references file (define* (remove-store-references file
#:optional (store (or (getenv "NIX_STORE") #:optional (store (%store-directory)))
"/nix/store")))
"Remove from FILE occurrences of file names in STORE; return #t when "Remove from FILE occurrences of file names in STORE; return #t when
store paths were encountered in FILE, #f otherwise. This procedure is store paths were encountered in FILE, #f otherwise. This procedure is
known as `nuke-refs' in Nixpkgs." known as `nuke-refs' in Nixpkgs."

View File

@ -368,8 +368,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
;; SOURCE may be either a directory or a tarball. ;; SOURCE may be either a directory or a tarball.
(and (if (file-is-directory? source) (and (if (file-is-directory? source)
(let* ((store (or (getenv "NIX_STORE") (let* ((store (or (getenv "NIX_STORE") "/gnu/store"))
"/nix/store"))
(len (+ 1 (string-length store))) (len (+ 1 (string-length store)))
(base (string-drop source len)) (base (string-drop source len))
(dash (string-index base #\-)) (dash (string-index base #\-))