diff options
author | Peter Simons <simons@cryp.to> | 2013-12-16 21:20:49 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2013-12-29 12:26:05 +0100 |
commit | 63c60638fcc148a3f1d786216c434da723aeef3d (patch) | |
tree | 32416d436b32cca4305290b0898b1ef297ba301b /pkgs/build-support | |
parent | 7d577eb8227be980330bf220bc58217e898398d8 (diff) |
pkgs/build-support/cabal: clean up the code that sets rpath for shared executables
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/cabal/default.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index b98fef27ecb42..2898b14a12f8b 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -157,7 +157,7 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version; (optional (versionOlder "7" ghc.version) (enableFeature self.enableStaticLibraries "library-vanilla")) (optional (versionOlder "7.4" ghc.version) (enableFeature self.enableSharedExecutables "executable-dynamic")) (optional (versionOlder "7" ghc.version) (enableFeature self.doCheck "tests")) - ] ++ optional self.enableSharedExecutables "--ghc-option=-optl=-Wl,-rpath=$ORIGIN/../lib/${ghc.ghc.name}/${self.pname}-${self.version}"; + ]; # GHC needs the locale configured during the Haddock phase. LANG = "en_US.UTF-8"; @@ -188,6 +188,10 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version; done done + ${optionalString self.enableSharedExecutables '' + 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 \ |