diff --git a/flake.nix b/flake.nix index e7b1cdc48..d3b38c8e9 100644 --- a/flake.nix +++ b/flake.nix @@ -385,39 +385,16 @@ disallowedReferences preConfigure configureFlags + enableParallelBuilding + makeFlags + doCheck + installFlags + postInstall + doInstallCheck + installCheckFlags + installCheckTarget ; - enableParallelBuilding = true; - - makeFlags = "profiledir=$(out)/etc/profile.d PRECOMPILE_HEADERS=1"; - - doCheck = true; - - installFlags = "sysconfdir=$(out)/etc"; - - postInstall = '' - mkdir -p $doc/nix-support - echo "doc manual $doc/share/doc/nix/manual" >> $doc/nix-support/hydra-build-products - ${lib.optionalString currentStdenv.hostPlatform.isStatic '' - mkdir -p $out/nix-support - echo "file binary-dist $out/bin/nix" >> $out/nix-support/hydra-build-products - ''} - ${lib.optionalString currentStdenv.isDarwin '' - install_name_tool \ - -change ${boost}/lib/libboost_context.dylib \ - $out/lib/libboost_context.dylib \ - $out/lib/libnixutil.dylib - ''} - ''; - - doInstallCheck = finalAttrs.doCheck; - installCheckFlags = "sysconfdir=$(out)/etc"; - installCheckTarget = "installcheck"; # work around buggy detection in stdenv - - preInstallCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' - export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES - ''; - separateDebugInfo = !currentStdenv.hostPlatform.isStatic; strictDeps = true; diff --git a/package.nix b/package.nix index e9e9d0437..06f6898cc 100644 --- a/package.nix +++ b/package.nix @@ -58,7 +58,7 @@ baseFiles = fileset.fileFilter (f: f.name != ".gitignore") ./.; src = fileset.toSource { root = ./.; - fileset = fileset.intersect baseFiles (fileset.unions [ + fileset = fileset.intersection baseFiles (fileset.unions [ ./.version ./boehmgc-coroutine-sp-fallback.diff ./configure.ac @@ -188,8 +188,37 @@ in stdenv.mkDerivation (finalAttrs: { ++ lib.optional (!canRunInstalled) "--disable-doc-gen" ; + enableParallelBuilding = true; + + makeFlags = "profiledir=$(out)/etc/profile.d PRECOMPILE_HEADERS=1"; + doCheck = true; + installFlags = "sysconfdir=$(out)/etc"; + + postInstall = '' + mkdir -p $doc/nix-support + echo "doc manual $doc/share/doc/nix/manual" >> $doc/nix-support/hydra-build-products + ${lib.optionalString stdenv.hostPlatform.isStatic '' + mkdir -p $out/nix-support + echo "file binary-dist $out/bin/nix" >> $out/nix-support/hydra-build-products + ''} + ${lib.optionalString stdenv.isDarwin '' + install_name_tool \ + -change ${boost}/lib/libboost_context.dylib \ + $out/lib/libboost_context.dylib \ + $out/lib/libnixutil.dylib + ''} + ''; + + doInstallCheck = finalAttrs.doCheck; + installCheckFlags = "sysconfdir=$(out)/etc"; + installCheckTarget = "installcheck"; # work around buggy detection in stdenv + + preInstallCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' + export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES + ''; + # FIXME: Used to make checkInputs accessible from outside the derivation args # during the refactor. passthru.finalAttrs = finalAttrs;