From ff6953cb031c0d2a625bbb2df985a7a3bb17bc46 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Wed, 21 Oct 2015 12:38:45 -0700 Subject: Add resolve-system-dependencies.pl --- src/libstore/build.cc | 7 +++++++ src/libstore/local.mk | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/libstore') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 10f926bf8da7..0dac1377de74 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -60,9 +60,11 @@ #if __APPLE__ #define SANDBOX_ENABLED 1 #define DEFAULT_ALLOWED_IMPURE_PREFIXES "/System/Library /usr /dev /bin/sh" + #define DARWIN_PREBUILD 1 #else #define SANDBOX_ENABLED 0 #define DEFAULT_ALLOWED_IMPURE_PREFIXES "/bin" "/usr/bin" + #define DARWIN_PREBUILD 0 #endif #if CHROOT_ENABLED @@ -2045,6 +2047,11 @@ void DerivationGoal::startBuilder() } } +#if DARWIN_PREBUILD + if (settings.preBuildHook == "") + settings.preBuildHook = settings.nixLibexecDir + "/nix/resolve-system-dependencies.pl"; +#endif + if (settings.preBuildHook != "") { printMsg(lvlChatty, format("executing pre-build hook ‘%1%’") % settings.preBuildHook); diff --git a/src/libstore/local.mk b/src/libstore/local.mk index 4a4ba17c4b31..f10981ad444c 100644 --- a/src/libstore/local.mk +++ b/src/libstore/local.mk @@ -33,4 +33,4 @@ $(d)/local-store.cc: $(d)/schema.sql.hh clean-files += $(d)/schema.sql.hh $(eval $(call install-file-in, $(d)/nix-store.pc, $(prefix)/lib/pkgconfig, 0644)) -$(eval $(call install-file-in, $(d)/sandbox-defaults.sb, $(prefix)/share/nix, 0644)) +$(eval $(call install-file-in, $(d)/sandbox-defaults.sb, $(datadir)/nix, 0644)) -- cgit 1.4.1