Skip to content

Commit eb55468

Browse files
committed
Add ghcjs-prim, ghcjs-th to dummy ghcjs 8.10
1 parent a846d92 commit eb55468

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

lib/call-cabal-project-to-nix.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,15 +442,27 @@ let
442442
fi
443443
'') ghc-pkgs)
444444
}
445-
${ # There is not .cabal file for system-cxx-std-lib
445+
${ # There is no .cabal file for system-cxx-std-lib
446446
pkgs.lib.optionalString (builtins.compareVersions ghc.version "9.2" >= 0) (
447447
let name="system-cxx-std-lib"; in ''
448448
EXPOSED_MODULES_${varname name}=""
449449
DEPS_${varname name}=""
450450
VER_${varname name}="1.0"
451451
PKGS+=" ${name}"
452452
LAST_PKG="${name}"
453-
'')}
453+
'')
454+
# ghcjs packages (before the ghc JS backend). TODO remove this when GHC 8.10 support is dropped
455+
+ pkgs.lib.optionalString (pkgs.stdenv.targetPlatform.isGhcjs && builtins.compareVersions ghc.version "9" < 0) ''
456+
EXPOSED_MODULES_${varname "ghcjs-prim"}="GHCJS.Prim GHCJS.Prim.Internal GHCJS.Prim.Internal.Build"
457+
DEPS_${varname "ghcjs-prim"}="base ghc-prim"
458+
VER_${varname "ghcjs-prim"}="0.1.1.0"
459+
EXPOSED_MODULES_${varname "ghcjs-th"}="GHCJS.Prim.TH.Eval GHCJS.Prim.TH.Types"
460+
DEPS_${varname "ghcjs-th"}="base binary bytestring containers ghc-prim ghci template-haskell"
461+
VER_${varname "ghcjs-th"}="0.1.0.0"
462+
PKGS+=" ghcjs-prim ghcjs-th"
463+
LAST_PKG="ghcjs-th"
464+
''
465+
}
454466
for pkg in $PKGS; do
455467
varname="$(echo $pkg | tr "-" "_")"
456468
ver="VER_$varname"

0 commit comments

Comments
 (0)