ihaskell: unbreak

Use upstream release.nix as an inspiration for the correct overrides to
fix RPATH issues and make tests run again.
This commit is contained in:
sternenseemann
2021-05-04 13:27:41 +02:00
parent 96f573300f
commit 990d12641e
4 changed files with 15 additions and 40 deletions
@@ -826,4 +826,19 @@ self: super: builtins.intersectAttrs super {
# Tests access internet
prune-juice = dontCheck super.prune-juice;
# based on https://github.com/gibiansky/IHaskell/blob/aafeabef786154d81ab7d9d1882bbcd06fc8c6c4/release.nix
ihaskell = overrideCabal super.ihaskell (drv: {
configureFlags = (drv.configureFlags or []) ++ [
# ihaskell's cabal file forces building a shared executable,
# but without passing --enable-executable-dynamic, the RPATH
# contains /build/ and leads to a build failure with nix
"--enable-executable-dynamic"
];
preCheck = ''
export HOME=$TMPDIR/home
export PATH=$PWD/dist/build/ihaskell:$PATH
export GHC_PACKAGE_PATH=$PWD/dist/package.conf.inplace/:$GHC_PACKAGE_PATH
'';
});
}