Skip to content

Commit

Permalink
Try #1131:
Browse files Browse the repository at this point in the history
  • Loading branch information
iohk-bors[bot] committed Jun 6, 2021
2 parents 70e3bc7 + a525011 commit 91163cb
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
4 changes: 4 additions & 0 deletions builder/ghc-for-component-wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ in runCommand "${componentName}-${ghc.name}-env" {
# Replace the package database with the one from target package config.
ln -s ${configFiles}/${packageCfgDir} $out/${packageCfgDir}
# now the tricky bit. For GHCJS (to make plugins work), we need a special
# file called ghc_libdir. That points to the build ghc's lib.
echo "${ghc.buildGHC or ghc}/lib/${(ghc.buildGHC or ghc).name}" > "${libDir}/ghc_libdir"
# Wrap compiler executables with correct env variables.
# The NIX_ variables are used by the patched Paths_ghc module.
Expand Down
4 changes: 2 additions & 2 deletions compiler/ghcjs/ghcjs810-src.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"url": "https://github.com/ghcjs/ghcjs",
"rev": "88fc8b7993a7c06fa1a71dd8ea494330108fa397",
"sha256": "066vqflvxfiiw8xy0fygdq8bdqmhdjfgpqibnyfcg0xlr9wsf2ld",
"rev": "ecb5954b98cdaeb3d4097401c9c3551e7a6f69ce",
"sha256": "09120brnd8n8psskq9f098n7wrlrbb2h7s703678a4gbl2xfglql",
"fetchSubmodules": true
}
1 change: 1 addition & 0 deletions overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ in {
++ fromUntil "8.10.3" "8.10.5" ./patches/ghc/ghc-8.10.3-rts-make-markLiveObject-thread-safe.patch
++ final.lib.optional (versionAtLeast "8.10.4" && final.targetPlatform.isWindows) ./patches/ghc/ghc-8.10-z-drive-fix.patch
++ final.lib.optional (versionAtLeast "8.6.5") ./patches/ghc/ghc-8.10-windows-add-dependent-file.patch
++ fromUntil "8.10.1" "9.0" ./patches/ghc/Cabal-unbreak-GHCJS.patch
;
in ({
ghc844 = final.callPackage ../compiler/ghc {
Expand Down
20 changes: 20 additions & 0 deletions overlays/patches/ghc/Cabal-unbreak-GHCJS.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/libraries/Cabal/Cabal/Distribution/Simple/GHCJS.hs b/libraries/Cabal/Cabal/Distribution/Simple/GHCJS.hs
index 4ad5bb18c..5db4d27e7 100644
--- a/libraries/Cabal/Cabal/Distribution/Simple/GHCJS.hs
+++ b/libraries/Cabal/Cabal/Distribution/Simple/GHCJS.hs
@@ -317,13 +317,10 @@ checkPackageDbStack :: Verbosity -> PackageDBStack -> IO ()
checkPackageDbStack _ (GlobalPackageDB:rest)
| GlobalPackageDB `notElem` rest = return ()
checkPackageDbStack verbosity rest
- | GlobalPackageDB `notElem` rest =
- die' verbosity $ "With current ghc versions the global package db is always used "
- ++ "and must be listed first. This ghc limitation may be lifted in "
- ++ "future, see http://ghc.haskell.org/trac/ghc/ticket/5977"
-checkPackageDbStack verbosity _ =
+ | GlobalPackageDB `elem` rest =
die' verbosity $ "If the global package db is specified, it must be "
++ "specified first and cannot be specified multiple times"
+checkPackageDbStack _ _ = return ()

getInstalledPackages' :: Verbosity -> [PackageDB] -> ProgramDb
-> IO [(PackageDB, [InstalledPackageInfo])]
2 changes: 1 addition & 1 deletion release.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating
# on a machine with e.g. no way to build the Darwin IFDs you need!
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
, ifdLevel ? 3
, ifdLevel ? 2
, checkMaterialization ? false }:

let
Expand Down

0 comments on commit 91163cb

Please sign in to comment.