From b59b89d9e38805250dedbd0da8589f6835ecb728 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sat, 8 Oct 2016 10:45:48 +0200 Subject: [PATCH] Revert "Extend Haskell generic builder to use new --ipid flag." This reverts commit ec8b81615462625338d76f002d92accd6eb4cf6a. The change told the Cabal build system to use the hash-part of $out as the internal identifier for the library it's building (rather than generating such an ID itself). While a good idea in theory, this choice had an unfortunate side-effect: When Cabal links libraries X, Y, and Z into an executable, then the generated binary contains their respective IDs. Now, Nix finds those strings and treats them as an indication that there is a *run-time dependency* on the corresponding store paths. This means that the generated executable will always depend on the store paths of all the Haskell libraries that went into it, even when linked statically. --- pkgs/development/haskell-modules/generic-builder.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index e4fcd09c0e03..2b597532b44d 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -180,11 +180,6 @@ stdenv.mkDerivation ({ setupCompileFlags="${concatStringsSep " " setupCompileFlags}" configureFlags="${concatStringsSep " " defaultConfigureFlags} $configureFlags" - ${optionalString (stdenv.lib.versionOlder "8" ghc.version) '' - ipid=$(echo $(basename "$out") | cut -d- -f1) - configureFlags+=" --ipid=$ipid" - ''} - local inputClosure="" for i in $propagatedNativeBuildInputs $nativeBuildInputs; do findInputs $i inputClosure propagated-native-build-inputs