diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-12-04 23:51:31 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-12-04 23:51:31 +0100 |
commit | 5f25049e9c2002eb808d2f15306d0ac102f05415 (patch) | |
tree | a587cff1c805c20f45fd7e7f235d60c6d1ab7ac7 /guix | |
parent | b49ffe2d678b5df4192fb9be4ad50bed9d6d5b7f (diff) | |
parent | c7bdb1b9d1c0071e9a61a7bbdb8051a9b1620822 (diff) |
Merge branch 'master' into nix-integration
Diffstat (limited to 'guix')
-rw-r--r-- | guix/derivations.scm | 3 | ||||
-rw-r--r-- | guix/store.scm | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm index cda1f065d4..b1f54232bc 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -418,8 +418,7 @@ known in advance, such as a file download." ((input . _) (let ((path (add-to-store store (basename input) - (hash-algo sha256) #t #t - input))) + #t #t "sha256" input))) (make-derivation-input path '())))) (delete-duplicates inputs))) (env-vars (env-vars-with-empty-outputs)) diff --git a/guix/store.scm b/guix/store.scm index d1621e4504..9aafb332dc 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -111,7 +111,8 @@ (sha1 2) (sha256 3)) -(define %nix-state-dir "/nix/var/nix") +(define %nix-state-dir + (or (getenv "NIX_STATE_DIR") "/nix/var/nix")) (define %default-socket-path (string-append %nix-state-dir "/daemon-socket/socket")) @@ -437,7 +438,8 @@ file name. Return #t on success." (define %store-prefix ;; Absolute path to the Nix store. - (make-parameter "/nix/store")) + (make-parameter (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path) + "/nix/store"))) (define (store-path? path) "Return #t if PATH is a store path." |