mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
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.
This commit is contained in:
parent
8da6854350
commit
46e2a65bbf
4 changed files with 33 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
13
configure.ac
13
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],
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue