From 0a4e90395c3286a246b816575351b9f2016976ba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 2 Jan 2013 23:52:15 +0100 Subject: [PATCH] Urgggh http://hydra.nixos.org/build/3661100 --- configure.ac | 1 - release.nix | 2 ++ scripts/Makefile.am | 6 ++++-- substitute.mk | 1 + tests/Makefile.am | 2 ++ tests/common.sh.in | 2 +- tests/nix-profile.sh | 4 ++-- 7 files changed, 12 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 5816d75e5..ef3a060c4 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 8862fcca6..673d7f9d1 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 506b1aeb4..1453ed9cc 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 378751943..940b1206b 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 df3c9c600..38cf7b1bd 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 f327ad727..2ae34603f 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 c9c756b60..a00864c97 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 ]