summaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-06 22:33:03 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-06 23:51:04 +0200
commitf073e52382d2ddcc638de73533bbf798f600d78a (patch)
treee51183c70aee2452d20c965feb515689da2dcb28 /guix/utils.scm
parentdd01fecd23a4ded46b99a51dc08ac5d964dbcd53 (diff)
downloadgnu-guix-f073e52382d2ddcc638de73533bbf798f600d78a.tar
gnu-guix-f073e52382d2ddcc638de73533bbf798f600d78a.tar.gz
utils: Remove Nixpkgs helpers.
* guix/config.scm.in (%nixpkgs): Remove. * guix/utils.scm (%nixpkgs-directory, nixpkgs-derivation, nixpkgs-derivation*): Remove. * test-env.in: Export 'NIXPKGS'. * tests/derivations.scm (%coreutils): Remove use of 'nixpkgs-derivation'. * tests/snix.scm (%nixpkgs-directory): New variable. Adjust users accordingly.
Diffstat (limited to 'guix/utils.scm')
-rw-r--r--guix/utils.scm38
1 files changed, 0 insertions, 38 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index b6df5d9cc9..1d4b2ff9b0 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -44,10 +44,6 @@
#:export (bytevector->base16-string
base16-string->bytevector
- %nixpkgs-directory
- nixpkgs-derivation
- nixpkgs-derivation*
-
compile-time-value
fcntl-flock
memoize
@@ -316,40 +312,6 @@ a list of command-line arguments passed to the compression program."
;;;
-;;; Nixpkgs.
-;;;
-
-(define %nixpkgs-directory
- (make-parameter
- ;; Capture the build-time value of $NIXPKGS.
- (or %nixpkgs
- (and=> (getenv "NIXPKGS")
- (lambda (val)
- ;; Bail out when passed an empty string, otherwise
- ;; `nix-instantiate' will sit there and attempt to read
- ;; from its standard input.
- (if (string=? val "")
- #f
- val))))))
-
-(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)
- "--argstr" "system" system))
- (l (read-line p))
- (s (close-pipe p)))
- (and (zero? (status:exit-val s))
- (not (eof-object? l))
- l)))
-
-(define-syntax-rule (nixpkgs-derivation* attribute)
- "Evaluate the given Nixpkgs derivation at compile-time."
- (compile-time-value (nixpkgs-derivation attribute)))
-
-
-;;;
;;; Advisory file locking.
;;;