mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
Factor out ghcjs's libdir better.
This commit is contained in:
parent
983af4a921
commit
1c9166f649
|
@ -188,7 +188,7 @@ in
|
||||||
done
|
done
|
||||||
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) ''
|
${optionalString (self.enableSharedExecutables && self.stdenv.isLinux) ''
|
||||||
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";
|
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";
|
||||||
|
|
|
@ -77,6 +77,7 @@ cabal.mkDerivation (self: rec {
|
||||||
sed -i -e "s|str = \\[\\]|str = [\"--prefix=$out\", \"--libdir=$prefix/lib/$compiler\", \"--libsubdir=$pkgid\"]|" \
|
sed -i -e "s|str = \\[\\]|str = [\"--prefix=$out\", \"--libdir=$prefix/lib/$compiler\", \"--libsubdir=$pkgid\"]|" \
|
||||||
src-bin/Boot.hs
|
src-bin/Boot.hs
|
||||||
'';
|
'';
|
||||||
|
libdir = "/share/ghcjs/${pkgs.stdenv.system}-${version}-${ghc.ghc.version}";
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
export HOME=$(pwd)
|
export HOME=$(pwd)
|
||||||
export GIT_SSL_CAINFO="${cacert}/etc/ca-bundle.crt"
|
export GIT_SSL_CAINFO="${cacert}/etc/ca-bundle.crt"
|
||||||
|
@ -86,7 +87,7 @@ cabal.mkDerivation (self: rec {
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
( cd boot ; chmod u+w . ; ln -s .. ghcjs-boot )
|
( cd boot ; chmod u+w . ; ln -s .. ghcjs-boot )
|
||||||
chmod -R u+w . # because fetchgit made it read-only
|
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
|
ensureDir $GHCJS_LIBDIR
|
||||||
cp -R ${shims} $GHCJS_LIBDIR/shims
|
cp -R ${shims} $GHCJS_LIBDIR/shims
|
||||||
${cabalInstallGhcjs}/bin/cabal-js update
|
${cabalInstallGhcjs}/bin/cabal-js update
|
||||||
|
|
Loading…
Reference in a new issue