aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-12-13 22:14:25 +0100
committerLudovic Courtès <ludo@gnu.org>2012-12-13 22:14:25 +0100
commit1e9824513c570370638b1bfe33bf1dba1f12be4a (patch)
treecb7bd7f0bebd42dbeabf2c8f09ae1d5144ac969b /guix
parent70915c1a2ef72e7350b2a29d1d93e30643bce6f3 (diff)
parentb35c0f866c83288e64dcf5839d908705d416c317 (diff)
downloadgnu-guix-1e9824513c570370638b1bfe33bf1dba1f12be4a.tar
gnu-guix-1e9824513c570370638b1bfe33bf1dba1f12be4a.tar.gz
Merge branch 'nix-integration'
Conflicts: tests/guix-package.sh
Diffstat (limited to 'guix')
-rw-r--r--guix/config.scm.in12
-rw-r--r--guix/store.scm9
-rw-r--r--guix/utils.scm3
3 files changed, 18 insertions, 6 deletions
diff --git a/guix/config.scm.in b/guix/config.scm.in
index 462dcd0ed1..4717b1c967 100644
--- a/guix/config.scm.in
+++ b/guix/config.scm.in
@@ -20,6 +20,9 @@
#:export (%guix-package-name
%guix-version
%guix-bug-report-address
+ %store-directory
+ %state-directory
+ %system
%libgcrypt
%nixpkgs
%nix-instantiate))
@@ -39,6 +42,15 @@
(define %guix-bug-report-address
"@PACKAGE_BUGREPORT@")
+(define %store-directory
+ "@storedir@")
+
+(define %state-directory
+ "@guix_localstatedir@")
+
+(define %system
+ "@guix_system@")
+
(define %libgcrypt
"@LIBGCRYPT@")
diff --git a/guix/store.scm b/guix/store.scm
index 204364f319..a8dd566355 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -18,6 +18,7 @@
(define-module (guix store)
#:use-module (guix utils)
+ #:use-module (guix config)
#:use-module (rnrs bytevectors)
#:use-module (rnrs io ports)
#:use-module (srfi srfi-1)
@@ -124,11 +125,9 @@
(delete-dead 2)
(delete-specific 3))
-(define %nix-state-dir
- (or (getenv "NIX_STATE_DIR") "/nix/var/nix"))
-
(define %default-socket-path
- (string-append %nix-state-dir "/daemon-socket/socket"))
+ (string-append (or (getenv "NIX_STATE_DIR") %state-directory)
+ "/daemon-socket/socket"))
;; serialize.cc
@@ -538,7 +537,7 @@ collected, and the number of bytes freed."
(define %store-prefix
;; Absolute path to the Nix store.
(make-parameter (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
- "/nix/store")))
+ %store-directory)))
(define (store-path? path)
"Return #t if PATH is a store path."
diff --git a/guix/utils.scm b/guix/utils.scm
index 453b3843dd..ad50c20cce 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -350,7 +350,8 @@ returned by `config.guess'."
(define %current-system
;; System type as expected by Nix, usually ARCHITECTURE-KERNEL.
- (make-parameter (gnu-triplet->nix-system %host-type)))
+ ;; By default, this is equal to (gnu-triplet->nix-system %host-type).
+ (make-parameter %system))
(define (package-name->name+version name)
"Given NAME, a package name like \"foo-0.9.1b\", return two values: