Factor out ghcjs's libdir better.

This commit is contained in:
Ryan Trinkle 2014-08-25 18:46:52 -04:00
parent 983af4a921
commit 1c9166f649
2 changed files with 3 additions and 2 deletions

View File

@ -188,7 +188,7 @@ in
done
done
configureFlags+=" --package-db=${ghc.ghc}/share/ghcjs/x86_64-linux-0.1.0-7.8.2/ghcjs/package.conf.d"
configureFlags+=" --package-db=${ghc.ghc}${ghc.ghc.libdir}/ghcjs/package.conf.d"
${optionalString (self.enableSharedExecutables && self.stdenv.isLinux) ''
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";

View File

@ -77,6 +77,7 @@ cabal.mkDerivation (self: rec {
sed -i -e "s|str = \\[\\]|str = [\"--prefix=$out\", \"--libdir=$prefix/lib/$compiler\", \"--libsubdir=$pkgid\"]|" \
src-bin/Boot.hs
'';
libdir = "/share/ghcjs/${pkgs.stdenv.system}-${version}-${ghc.ghc.version}";
postInstall = ''
export HOME=$(pwd)
export GIT_SSL_CAINFO="${cacert}/etc/ca-bundle.crt"
@ -86,7 +87,7 @@ cabal.mkDerivation (self: rec {
git submodule update --init --recursive
( cd boot ; chmod u+w . ; ln -s .. ghcjs-boot )
chmod -R u+w . # because fetchgit made it read-only
local GHCJS_LIBDIR=$out/share/ghcjs/${pkgs.stdenv.system}-${version}-${ghc.ghc.version}
local GHCJS_LIBDIR=$out${libdir}
ensureDir $GHCJS_LIBDIR
cp -R ${shims} $GHCJS_LIBDIR/shims
${cabalInstallGhcjs}/bin/cabal-js update