diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-10-25 23:42:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-10-25 23:42:06 +0200 |
commit | fbc93bedff2a419305038564232837aff52513d2 (patch) | |
tree | 611621fe325c9bd815c8792c1fd6707525228bb5 /guix | |
parent | b642e4b853e9e3b8bbf5f5769fb602c6f4191347 (diff) | |
download | gnu-guix-fbc93bedff2a419305038564232837aff52513d2.tar gnu-guix-fbc93bedff2a419305038564232837aff52513d2.tar.gz |
Add a `system' parameter to `nixpkgs-derivation'.
* guix/utils.scm (nixpkgs-derivation): Add a `system' parameter. Pass
it in the `nix-instantiate' invocation.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/utils.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 2d51e44a22..d0a09c9f5c 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -460,11 +460,12 @@ starting from the right of S." ;; Capture the build-time value of $NIXPKGS. (compile-time-value (getenv "NIXPKGS")))) -(define (nixpkgs-derivation attribute) +(define* (nixpkgs-derivation attribute #:optional (system (%current-system))) "Return the derivation path of ATTRIBUTE in Nixpkgs." (let* ((p (open-pipe* OPEN_READ (or (getenv "NIX_INSTANTIATE") "nix-instantiate") - "-A" attribute (%nixpkgs-directory))) + "-A" attribute (%nixpkgs-directory) + "--argstr" "system" system)) (l (read-line p)) (s (close-pipe p))) (and (zero? (status:exit-val s)) |