From 1c9166f64999dc0a74c23574725bd62d4661e415 Mon Sep 17 00:00:00 2001 From: Ryan Trinkle Date: Mon, 25 Aug 2014 18:46:52 -0400 Subject: [PATCH] Factor out ghcjs's libdir better. --- pkgs/build-support/cabal/ghcjs.nix | 2 +- pkgs/development/tools/haskell/ghcjs/default.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/cabal/ghcjs.nix b/pkgs/build-support/cabal/ghcjs.nix index d74c30180e2..e6bc50f4516 100644 --- a/pkgs/build-support/cabal/ghcjs.nix +++ b/pkgs/build-support/cabal/ghcjs.nix @@ -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}"; diff --git a/pkgs/development/tools/haskell/ghcjs/default.nix b/pkgs/development/tools/haskell/ghcjs/default.nix index 55e3d5875e7..7602bf70811 100644 --- a/pkgs/development/tools/haskell/ghcjs/default.nix +++ b/pkgs/development/tools/haskell/ghcjs/default.nix @@ -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