about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/with-packages-wrapper.nix
diff options
context:
space:
mode:
authorDavid Johnson <djohnson.m@gmail.com>2017-02-04 11:19:14 -0600
committerDavid Johnson <djohnson.m@gmail.com>2017-03-10 19:31:12 -0600
commit26623240e93f8454ac69f66a3a025d98a7e94b71 (patch)
treee929462cc37cde5d489f87bcf3bbe40be5b5f601 /pkgs/development/haskell-modules/with-packages-wrapper.nix
parent2839b101f927be5daab7948421de00a6f6c084ae (diff)
downloadnixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.gz
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.bz2
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.lz
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.xz
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.zst
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.zip
Init HaLVM at 2.4.0
Diffstat (limited to 'pkgs/development/haskell-modules/with-packages-wrapper.nix')
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index e04cbe08c2c7..15d66bbd6dc0 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -8,7 +8,7 @@
 assert ghcLibdir != null -> (ghc.isGhcjs or false);
 
 # This wrapper works only with GHC 6.12 or later.
-assert lib.versionOlder "6.12" ghc.version || ghc.isGhcjs;
+assert lib.versionOlder "6.12" ghc.version || ghc.isGhcjs || ghc.isHaLVM;
 
 # It's probably a good idea to include the library "ghc-paths" in the
 # compiler environment, because we have a specially patched version of
@@ -33,13 +33,14 @@ assert lib.versionOlder "6.12" ghc.version || ghc.isGhcjs;
 
 let
   isGhcjs       = ghc.isGhcjs or false;
-  ghc761OrLater = isGhcjs || lib.versionOlder "7.6.1" ghc.version;
+  isHaLVM       = ghc.isHaLVM or false;
+  ghc761OrLater = isGhcjs || isHaLVM || lib.versionOlder "7.6.1" ghc.version;
   packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
-  ghcCommand'    = if isGhcjs then "ghcjs" else "ghc";
+  ghcCommand'   = if isGhcjs then "ghcjs" else "ghc";
   crossPrefix = if (ghc.cross or null) != null then "${ghc.cross.config}-" else "";
   ghcCommand = "${crossPrefix}${ghcCommand'}";
   ghcCommandCaps= lib.toUpper ghcCommand';
-  libDir        = "$out/lib/${ghcCommand}-${ghc.version}";
+  libDir        = if isHaLVM then "$out/lib/HaLVM-${ghc.version}" else "$out/lib/${ghcCommand}-${ghc.version}";
   docDir        = "$out/share/doc/ghc/html";
   packageCfgDir = "${libDir}/package.conf.d";
   paths         = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);