build: Remove checks for 'nix-instantiate'.

* guix/import/snix.scm (open-nixpkgs): Use "nix-instantiate"
unconditionally.
* configure.ac: Remove check for 'nix-instantiate'.
* guix/config.scm.in (%nix-instantiate): Remove.
* guix/self.scm (%dependency-variables): Remove '%nix-instantiate'.
(make-config.scm): Remove it from the generated "config.scm".
* build-aux/build-self.scm (%dependency-variables, make-config.scm):
Likewise.
This commit is contained in:
Ludovic Courtès 2018-06-18 22:53:25 +02:00
parent 45779fa676
commit e8cb9c01c6
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
5 changed files with 10 additions and 29 deletions

View File

@ -53,7 +53,7 @@
(define %dependency-variables (define %dependency-variables
;; (guix config) variables corresponding to dependencies. ;; (guix config) variables corresponding to dependencies.
'(%libgcrypt %libz %xz %gzip %bzip2 %nix-instantiate)) '(%libgcrypt %libz %xz %gzip %bzip2))
(define %persona-variables (define %persona-variables
;; (guix config) variables that define Guix's persona. ;; (guix config) variables that define Guix's persona.
@ -94,8 +94,7 @@
%libz %libz
%gzip %gzip
%bzip2 %bzip2
%xz %xz))
%nix-instantiate))
;; XXX: Work around <http://bugs.gnu.org/15602>. ;; XXX: Work around <http://bugs.gnu.org/15602>.
(eval-when (expand load eval) (eval-when (expand load eval)
@ -121,10 +120,7 @@
(file-append libgcrypt "/lib/libgcrypt"))) (file-append libgcrypt "/lib/libgcrypt")))
(define %libz (define %libz
#+(and zlib #+(and zlib
(file-append zlib "/lib/libz"))) (file-append zlib "/lib/libz")))))))
(define %nix-instantiate ;for (guix import snix)
"nix-instantiate")))))
;;; ;;;

View File

@ -160,18 +160,11 @@ AC_ARG_WITH([nix-prefix],
esac], esac],
[]) [])
AC_PATH_PROG([NIX_INSTANTIATE], [nix-instantiate])
AC_PATH_PROG([NIX_HASH], [nix-hash]) AC_PATH_PROG([NIX_HASH], [nix-hash])
if test "x$guix_build_daemon$NIX_INSTANTIATE$NIX_HASH" = "xno"; then if test "x$guix_build_daemon$NIX_HASH" = "xno"; then
AC_MSG_ERROR([Nix programs not found; please install Nix or use `--with-nix-prefix'.]) AC_MSG_ERROR([Nix programs not found; please install Nix or use `--with-nix-prefix'.])
fi fi
if test "x$NIX_INSTANTIATE" = "x"; then
# This program is an optional dependency, so we just want it to be
# taken from $PATH if it's not available right now.
NIX_INSTANTIATE="nix-instantiate"
fi
AC_ARG_WITH([nixpkgs], AC_ARG_WITH([nixpkgs],
[AS_HELP_STRING([--with-nixpkgs=DIR], [AS_HELP_STRING([--with-nixpkgs=DIR],
[search for Nixpkgs in DIR (for testing purposes only)])], [search for Nixpkgs in DIR (for testing purposes only)])],

View File

@ -35,7 +35,6 @@
%system %system
%libgcrypt %libgcrypt
%libz %libz
%nix-instantiate
%gzip %gzip
%bzip2 %bzip2
%xz)) %xz))
@ -95,9 +94,6 @@
(define %libz (define %libz
"@LIBZ@") "@LIBZ@")
(define %nix-instantiate
"@NIX_INSTANTIATE@")
(define %gzip (define %gzip
"@GZIP@") "@GZIP@")

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -283,7 +283,7 @@ ATTRIBUTE is true, only that attribute is considered."
platform = (import ~a/pkgs/top-level/platforms.nix).sheevaplug; platform = (import ~a/pkgs/top-level/platforms.nix).sheevaplug;
}" nixpkgs))) }" nixpkgs)))
(apply open-pipe* OPEN_READ (apply open-pipe* OPEN_READ
%nix-instantiate "--strict" "--eval-only" "--xml" "nix-instantiate" "--strict" "--eval-only" "--xml"
;; Pass a dummy `crossSystem' argument so that `buildInputs' and ;; Pass a dummy `crossSystem' argument so that `buildInputs' and
;; `nativeBuildInputs' are not coalesced. ;; `nativeBuildInputs' are not coalesced.

View File

@ -655,7 +655,7 @@ assumed to be part of MODULES."
(define %dependency-variables (define %dependency-variables
;; (guix config) variables corresponding to dependencies. ;; (guix config) variables corresponding to dependencies.
'(%libgcrypt %libz %xz %gzip %bzip2 %nix-instantiate)) '(%libgcrypt %libz %xz %gzip %bzip2))
(define %persona-variables (define %persona-variables
;; (guix config) variables that define Guix's persona. ;; (guix config) variables that define Guix's persona.
@ -696,8 +696,7 @@ assumed to be part of MODULES."
%libz %libz
%gzip %gzip
%bzip2 %bzip2
%xz %xz))
%nix-instantiate))
#$@(map (match-lambda #$@(map (match-lambda
((name . value) ((name . value)
@ -721,13 +720,10 @@ assumed to be part of MODULES."
(file-append libgcrypt "/lib/libgcrypt"))) (file-append libgcrypt "/lib/libgcrypt")))
(define %libz (define %libz
#+(and zlib #+(and zlib
(file-append zlib "/lib/libz"))) (file-append zlib "/lib/libz"))))
(define %nix-instantiate ;for (guix import snix)
"nix-instantiate"))
;; Guile 2.0 *requires* the 'define-module' to be at the ;; Guile 2.0 *requires* the 'define-module' to be at the
;; top-level or it 'toplevel-ref' in the resulting .go file are ;; top-level or the 'toplevel-ref' in the resulting .go file are
;; made relative to a nonexistent anonymous module. ;; made relative to a nonexistent anonymous module.
#:splice? #t)) #:splice? #t))