diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | release.nix | 2 | ||||
-rw-r--r-- | scripts/Makefile.am | 6 | ||||
-rw-r--r-- | substitute.mk | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/common.sh.in | 2 | ||||
-rw-r--r-- | tests/nix-profile.sh | 4 |
7 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 5816d75e50ef..ef3a060c45e0 100644 --- a/configure.ac +++ b/configure.ac @@ -354,7 +354,6 @@ fi AC_SUBST(tarFlags) - AM_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile src/Makefile diff --git a/release.nix b/release.nix index 8862fcca6b80..673d7f9d19d5 100644 --- a/release.nix +++ b/release.nix @@ -94,6 +94,8 @@ let enableParallelBuilding = true; + makeFlags = "profiledir=$(out)/etc/profile.d"; + installFlags = "sysconfdir=$(out)/etc"; doInstallCheck = true; diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 506b1aeb454f..1453ed9cc1ac 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -7,9 +7,11 @@ noinst_SCRIPTS = nix-profile.sh \ find-runtime-roots.pl build-remote.pl nix-reduce-build \ copy-from-other-stores.pl nix-http-export.cgi +profiledir = $(sysconfdir)/profile.d + install-exec-local: download-using-manifests.pl copy-from-other-stores.pl download-from-binary-cache.pl find-runtime-roots.pl - $(INSTALL) -d $(DESTDIR)$(sysconfdir)/profile.d - $(INSTALL_DATA) nix-profile.sh $(DESTDIR)$(sysconfdir)/profile.d/nix.sh + $(INSTALL) -d $(DESTDIR)$(profiledir) + $(INSTALL_DATA) nix-profile.sh $(DESTDIR)$(profiledir)/nix.sh $(INSTALL) -d $(DESTDIR)$(libexecdir)/nix $(INSTALL_PROGRAM) find-runtime-roots.pl $(DESTDIR)$(libexecdir)/nix $(INSTALL_PROGRAM) build-remote.pl $(DESTDIR)$(libexecdir)/nix diff --git a/substitute.mk b/substitute.mk index 378751943a7e..940b1206bdd6 100644 --- a/substitute.mk +++ b/substitute.mk @@ -7,6 +7,7 @@ -e "s^@bindir\@^$(bindir)^g" \ -e "s^@datadir\@^$(datadir)^g" \ -e "s^@sysconfdir\@^$(sysconfdir)^g" \ + -e "s^@profiledir\@^$(profiledir)^g" \ -e "s^@localstatedir\@^$(localstatedir)^g" \ -e "s^@datadir\@^$(datadir)^g" \ -e "s^@libdir\@^$(libdir)^g" \ diff --git a/tests/Makefile.am b/tests/Makefile.am index df3c9c6006c2..38cf7b1bda1f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,6 +14,8 @@ TESTS = init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \ XFAIL_TESTS = +profiledir = $(sysconfdir)/profile.d + include ../substitute.mk $(TESTS): common.sh config.nix diff --git a/tests/common.sh.in b/tests/common.sh.in index f327ad727632..2ae34603fcb5 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -1,7 +1,7 @@ set -e datadir="@datadir@" -sysconfdir="@sysconfdir@" +profiledir="@profiledir@" export TEST_ROOT=$(pwd)/test-tmp export NIX_STORE_DIR diff --git a/tests/nix-profile.sh b/tests/nix-profile.sh index c9c756b60c04..a00864c97708 100644 --- a/tests/nix-profile.sh +++ b/tests/nix-profile.sh @@ -3,8 +3,8 @@ source common.sh home=$TEST_ROOT/home rm -rf $home mkdir -p $home -HOME=$home $SHELL -e -c ". $sysconfdir/profile.d/nix.sh" -HOME=$home $SHELL -e -c ". $sysconfdir/profile.d/nix.sh" # test idempotency +HOME=$home $SHELL -e -c ". $profiledir/nix.sh" +HOME=$home $SHELL -e -c ". $profiledir/nix.sh" # test idempotency [ -L $home/.nix-profile ] [ -e $home/.nix-channels ] |