diff options
author | Peter Simons <simons@cryp.to> | 2014-05-01 23:14:55 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2014-05-01 23:14:55 +0200 |
commit | 5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da (patch) | |
tree | bd3f4185e8bda927db7d834cd04c0211937f316f /pkgs/build-support/cabal | |
parent | 8b67834bf32cebaaa9f98e2312a395f4cac03475 (diff) | |
download | nixpkgs-5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da.tar nixpkgs-5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da.tar.gz nixpkgs-5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da.tar.bz2 nixpkgs-5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da.tar.lz nixpkgs-5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da.tar.xz nixpkgs-5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da.tar.zst nixpkgs-5849a91e8dfba9fa1d4bd10b75aa65e2ce2296da.zip |
pkgs/build-support/cabal: revert "the release version of GHC 7.8.x no longer requires"
This reverts commit a2a398fbda842594ab17d0b98f68dba4c51e49e8. The issue *does* still exist in GHC 7.8.2. Compiled binaries have no -rpath into their own install directory ("$out") and thus cannot find their own shared libraries. To work around this issue, we pass an explicit -rpath argument at configure time. We do that only on Linux, though, because -rpath is known to cause trouble on Darwin, which was the reason I originally reverted that patch.
Diffstat (limited to 'pkgs/build-support/cabal')
-rw-r--r-- | pkgs/build-support/cabal/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index ed7ca30db13..45bd5567fc4 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -195,6 +195,10 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version; done done + ${optionalString (self.enableSharedExecutables && self.stdenv.isLinux) '' + configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}"; + ''} + echo "configure flags: $extraConfigureFlags $configureFlags" ./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \ --libsubdir='$pkgid' $extraConfigureFlags $configureFlags 2>&1 \ |