[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/07: config: add variables for more directories, %impersonate-linux-2.
From: |
guix-commits |
Subject: |
05/07: config: add variables for more directories, %impersonate-linux-2.6? |
Date: |
Fri, 24 Apr 2020 16:15:43 -0400 (EDT) |
reepca pushed a commit to branch guile-daemon
in repository guix.
commit 46e2a65bbf27844bde60d313836e8faad039d6cd
Author: Caleb Ristvedt <address@hidden>
AuthorDate: Thu Dec 12 07:41:16 2019 -0600
config: add variables for more directories, %impersonate-linux-2.6?
* guix/config.scm.in: rename to guix/config.scm.in.in.
* guix/config.scm.in.in (%temp-directory, %libexecdir,
%impersonate-linux-2.6?):
new variables.
* configure.ac: Add option impersonate-linux-2.6-default and substitute
it. Adjust from config.scm.in to config.scm.in.in.
* Makefile.am: Substitute libexecdir in guix/config.scm.in to produce final
result, guix/config.scm.
---
Makefile.am | 6 +++++-
configure.ac | 13 ++++++++++++-
guix/{config.scm.in => config.scm.in.in} | 16 +++++++++++++++-
guix/store/derivations.scm | 3 +--
4 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 344ecdb..0bce8ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,8 @@ do_subst = $(SED) \
-e 's,[@]GUILE[@],$(GUILE),g' \
-e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
-e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
- -e 's,[@]localedir[@],$(localedir),g'
+ -e 's,[@]localedir[@],$(localedir),g' \
+ -e 's,[@]Libexecdir[@],$(libexecdir),g'
scripts/guix: scripts/guix.in Makefile
$(AM_V_at)rm -f $@ $@-t
@@ -47,6 +48,9 @@ scripts/guix: scripts/guix.in Makefile
$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
$(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
+guix/config.scm: guix/config.scm.in
+ $(AM_V_GEN)$(do_subst) < "$@.in" > "$@"
+
nodist_noinst_SCRIPTS = \
pre-inst-env \
test-env
diff --git a/configure.ac b/configure.ac
index 6a6a020..9125fe9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,17 @@ AC_ARG_WITH([selinux-policy-dir],
[selinux_policydir='${datadir}/selinux/'])
AC_SUBST([selinux_policydir])
+AC_ARG_WITH(impersonate-linux-2.6-default,
+ AC_HELP_STRING([--with-impersonate-linux-2.6-default],
+ [Whether builds should should impersonate linux 2.6 by default]),
+ [if test "x$withval" = "xyes"; then
+ impersonate_linux26="#t";
+ else
+ impersonate_linux26="#f";
+ fi],
+ [impersonate_linux26="#f"])
+AC_SUBST(impersonate_linux26)
+
dnl Better be verbose.
AC_MSG_CHECKING([for the store directory])
AC_MSG_RESULT([$storedir])
@@ -306,7 +317,7 @@ AC_CONFIG_FILES([Makefile
po/guix/Makefile.in
po/packages/Makefile.in
etc/guix-daemon.cil
- guix/config.scm])
+ guix/config.scm.in])
AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
diff --git a/guix/config.scm.in b/guix/config.scm.in.in
similarity index 89%
rename from guix/config.scm.in
rename to guix/config.scm.in.in
index 0ada0f3..1f1e419 100644
--- a/guix/config.scm.in
+++ b/guix/config.scm.in.in
@@ -26,6 +26,8 @@
%storedir
%localstatedir
%sysconfdir
+ %temp-directory
+ %libexecdir
%store-directory
%state-directory
@@ -37,7 +39,8 @@
%liblz
%gzip
%bzip2
- %xz))
+ %xz
+ %impersonate-linux-2.6?))
;;; Commentary:
;;;
@@ -64,9 +67,20 @@
(define %localstatedir
"@guix_localstatedir@")
+(define %temp-directory
+ (or (getenv "TMPDIR")
+ "/tmp"))
+
+(define %impersonate-linux-2.6?
+ (make-parameter @impersonate_linux26@))
+
(define %sysconfdir
"@guix_sysconfdir@")
+(define %libexecdir
+ (or (getenv "NIX_LIBEXEC_DIR")
+ "@Libexecdir@/guix"))
+
(define %store-directory
(or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
%storedir))
diff --git a/guix/store/derivations.scm b/guix/store/derivations.scm
index 1883969..b65f68e 100644
--- a/guix/store/derivations.scm
+++ b/guix/store/derivations.scm
@@ -317,7 +317,7 @@ name of each input with that input's hash."
(make-derivation-input hash sub-drvs))))
inputs)))
(make-derivation outputs
- (sort inputs
+ (sort (delete-duplicates inputs)
(lambda (drv1 drv2)
(string<? (derivation-input-derivation drv1)
(derivation-input-derivation drv2))))
@@ -353,7 +353,6 @@ long-running processes that know what they're doing. Use
with care!"
;; Typically this is meant to be used by Cuirass and Hydra, which can clear
;; caches when they start evaluating packages for another architecture.
(invalidate-memoization! derivation->bytevector)
- (invalidate-memoization! derivation-base16-hash)
;; FIXME: Comment out to work around <https://bugs.gnu.org/36487>.
;; (hash-clear! %derivation-cache)
- branch guile-daemon created (now 6c1ff3f), guix-commits, 2020/04/24
- 01/07: guix: split (guix store) and (guix derivations)., guix-commits, 2020/04/24
- 02/07: guix: store: Register derivation outputs., guix-commits, 2020/04/24
- 06/07: guix/store/environment.scm: new module, guix-commits, 2020/04/24
- 04/07: syscalls: add missing pieces for derivation build environment, guix-commits, 2020/04/24
- 03/07: gnu: linux-container: Make it more suitable for derivation-building., guix-commits, 2020/04/24
- 07/07: guix/store/build-derivations.scm: new module., guix-commits, 2020/04/24
- 05/07: config: add variables for more directories, %impersonate-linux-2.6?,
guix-commits <=