diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 9516aca53663..38d74178e2e2 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -144,9 +144,9 @@ let allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++ optionals doCheck testPkgconfigDepends ++ optionals withBenchmarkDepends benchmarkPkgconfigDepends; + nativeBuildInputs = setupHaskellDepends ++ buildTools ++ libraryToolDepends ++ executableToolDepends; propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends; - otherBuildInputs = extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++ setupHaskellDepends ++ - buildTools ++ libraryToolDepends ++ executableToolDepends ++ + otherBuildInputs = extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++ optionals (allPkgconfigDepends != []) ([pkgconfig] ++ allPkgconfigDepends) ++ optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testToolDepends) ++ # ghcjs's hsc2hs calls out to the native hsc2hs @@ -181,8 +181,9 @@ stdenv.mkDerivation ({ inherit src; - nativeBuildInputs = otherBuildInputs ++ optionals (!hasActiveLibrary) propagatedBuildInputs; - propagatedNativeBuildInputs = optionals hasActiveLibrary propagatedBuildInputs; + inherit nativeBuildInputs; + buildInputs = otherBuildInputs ++ optionals (!hasActiveLibrary) propagatedBuildInputs; + propagatedBuildInputs = optionals hasActiveLibrary propagatedBuildInputs; LANG = "en_US.UTF-8"; # GHC needs the locale configured during the Haddock phase. @@ -209,11 +210,8 @@ stdenv.mkDerivation ({ setupCompileFlags="${concatStringsSep " " setupCompileFlags}" configureFlags="${concatStringsSep " " defaultConfigureFlags} $configureFlags" - local inputClosure="" - for i in $propagatedNativeBuildInputs $nativeBuildInputs; do - findInputs $i inputClosure propagated-native-build-inputs - done - for p in $inputClosure; do + # nativePkgs defined in stdenv/setup.hs + for p in $nativePkgs; do if [ -d "$p/lib/${ghc.name}/package.conf.d" ]; then cp -f "$p/lib/${ghc.name}/package.conf.d/"*.conf $packageConfDir/ continue