diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix index 87e2563bc7b..d46b2580918 100644 --- a/pkgs/development/libraries/haskell/cabal/cabal.nix +++ b/pkgs/development/libraries/haskell/cabal/cabal.nix @@ -102,12 +102,15 @@ GHC_PACKAGE_PATH=$installedPkgConf ghc-pkg --global register $pkgConf --force fi - ensureDir $out/nix-support - ln -s $out/nix-support/propagated-build-native-inputs $out/nix-support/propagated-user-env-packages - eval "$postInstall" ''; + postFixup = '' + if test -f $out/nix-support/propagated-build-native-inputs; then + ln -s $out/nix-support/propagated-build-native-inputs $out/nix-support/propagated-user-env-packages + fi + ''; + # We inherit stdenv and ghc so that they can be used # in Cabal derivations. inherit stdenv ghc;