on iko/ghcjs-patch-master help sign in
Default reinstallableLibGhc to true (#1498)

It fixes more things than it breaks now.

commit95faec6038f6684e4ef2a9476216bc1f72d44ffd authorHamish Mackenzie <Hamish.K.Mackenzie@gmail.com> dateThu 2 Jun 2022, 13:21 (4 years ago) parent02577a4
16 files changed+9−20
build.nix+1−2 modules/component-driver.nix+1−1 overlays/bootstrap.nix+4 overlays/ghc-packages.nix+1 overlays/hackage-quirks.nix−5 snapshots.nix−1 test/cabal-22/default.nix−1 test/cabal-simple-prof/default.nix−1 test/cabal-simple/default.nix−1 test/cabal-source-repo-comments/default.nix−1 test/cabal-source-repo/default.nix−1 test/cabal-sublib/default.nix−1 test/call-cabal-project-to-nix/default.nix−1 test/haskell-language-server/cabal.nix+1−1 test/setup-deps/default.nix+1−2 test/th-dlls/default.nix−1
build.nix+1−2
@@ -31,10 +31,9 @@ in rec {
3131 "ghc883" = "3.3.6";
3232 "ghc884" = "3.3.6";
3333 }.compiler-nix-name or "latest";
34− modules = [{ reinstallableLibGhc = true; }];
3534 };
3635 } // pkgs.lib.optionalAttrs (!__elem compiler-nix-name ["ghc921" "ghc922" "ghc923"]) {
37− hls-latest = tool compiler-nix-name "haskell-language-server" { modules = [{ reinstallableLibGhc = true; }]; };
36+ hls-latest = tool compiler-nix-name "haskell-language-server" "latest";
3837 })
3938 );
4039
modules/component-driver.nix+1−1
@@ -24,7 +24,7 @@ in
2424
2525 options.reinstallableLibGhc = lib.mkOption {
2626 type = lib.types.bool;
27− default = false;
27+ default = true;
2828 description = "Is lib:ghc reinstallable?";
2929 };
3030 options.setup-depends = lib.mkOption {
overlays/bootstrap.nix+4
@@ -923,6 +923,7 @@ in {
923923 packages.time-compat.components.library.doExactConfig = true;
924924 packages.time-locale-compat.components.library.doExactConfig = true;
925925 # Make Cabal reinstallable
926+ reinstallableLibGhc = false;
926927 nonReinstallablePkgs =
927928 [ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
928929 "deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
@@ -1089,12 +1090,14 @@ in {
10891090 version = "3.2.4";
10901091 inherit ghcOverride nix-tools cabal-install index-state;
10911092 materialized = ../materialized/bootstrap + "/${buildBootstrapper.compilerNixName}/alex";
1093+ modules = [{ reinstallableLibGhc = false; }];
10921094 } // args);
10931095 alex = bootstrap.packages.alex-tool {};
10941096 alex-unchecked = bootstrap.packages.alex-tool { checkMaterialization = false; };
10951097 happy-tool = { version ? "1.19.12", ... }@args: tool buildBootstrapper.compilerNixName "happy" ({
10961098 inherit version ghcOverride nix-tools cabal-install index-state;
10971099 materialized = ../materialized/bootstrap + "/${buildBootstrapper.compilerNixName}/happy-${version}";
1100+ modules = [{ reinstallableLibGhc = false; }];
10981101 } // args);
10991102 happy = bootstrap.packages.happy-tool {};
11001103 happy-unchecked = bootstrap.packages.happy-tool { checkMaterialization = false; };
@@ -1107,6 +1110,7 @@ in {
11071110 version = "1.24.4";
11081111 inherit ghcOverride nix-tools cabal-install index-state;
11091112 materialized = ../materialized/bootstrap + "/${buildBootstrapper.compilerNixName}/hscolour";
1113+ modules = [{ reinstallableLibGhc = false; }];
11101114 } // args)).getComponent "exe:HsColour";
11111115 hscolour = bootstrap.packages.hscolour-tool {};
11121116 hscolour-unchecked = bootstrap.packages.hscolour-tool { checkMaterialization = false; };
overlays/ghc-packages.nix+1
@@ -222,6 +222,7 @@ in rec {
222222 + "/${ghc-extra-projects-type}/${ghcName}";
223223 compiler-nix-name = ghcName;
224224 configureArgs = "--disable-tests --disable-benchmarks --allow-newer='terminfo:base'"; # avoid failures satisfying bytestring package tests dependencies
225+ modules = [{ reinstallableLibGhc = false; }];
225226 })
226227 ghc-extra-pkgs-cabal-projects;
227228
overlays/hackage-quirks.nix−5
@@ -18,7 +18,6 @@ in { haskell-nix = prev.haskell-nix // {
1818 allow-newer: cabal-install:base, *:base, *:template-haskell
1919 '';
2020 modules = [
21− { reinstallableLibGhc = true; }
2221 # Version of of cabal-install in hackage is broken for GHC 8.10.1
2322 (lib.optionalAttrs (version == "3.2.0.0") {
2423 packages.cabal-install.src = final.haskell-nix.sources.cabal-32 + "/cabal-install";
@@ -26,10 +25,6 @@ in { haskell-nix = prev.haskell-nix // {
2625 ];
2726 };
2827
29− hpack = {
30− modules = [ { reinstallableLibGhc = true; } ];
31− };
32−
3328 pandoc = {
3429 # Function that returns a sha256 string by looking up the location
3530 # and tag in a nested attrset
snapshots.nix−1
@@ -18,7 +18,6 @@ let
1818 pkg-def-extras = (pkg-def-extras name)
1919 ++ [(hackage: ghc-boot-packages.${(pkg-def hackage).compiler.nix-name})];
2020 modules = [
21− { reinstallableLibGhc = true; } # Allow ghc library to be installed for packages that need it
2221 { planned = true; } # All components in the snapshot are planned
2322 { packages.alex.package.setup-depends = [pkgSet.config.hsPkgs.Cabal]; }
2423 { packages.happy.package.setup-depends = [pkgSet.config.hsPkgs.Cabal]; }
test/cabal-22/default.nix−1
@@ -6,7 +6,6 @@ let
66 project = cabalProject' {
77 inherit compiler-nix-name;
88 src = testSrc "cabal-22";
9− modules = [{ reinstallableLibGhc = true; }];
109 };
1110
1211 packages = project.hsPkgs;
test/cabal-simple-prof/default.nix−1
@@ -6,7 +6,6 @@ with lib;
66let
77 modules = [
88 {
9− reinstallableLibGhc = true;
109 # Package has no exposed modules which causes
1110 # haddock: No input file(s)
1211 packages.cabal-simple.doHaddock = false;
test/cabal-simple/default.nix−1
@@ -6,7 +6,6 @@ with lib;
66let
77 modules = [
88 {
9− reinstallableLibGhc = true;
109 # Package has no exposed modules which causes
1110 # haddock: No input file(s)
1211 packages.cabal-simple.doHaddock = false;
test/cabal-source-repo-comments/default.nix−1
@@ -6,7 +6,6 @@ let
66 project = cabalProject' {
77 inherit compiler-nix-name;
88 src = testSrc "cabal-source-repo-comments";
9− modules = [{ reinstallableLibGhc = true; }];
109 };
1110 packages = project.hsPkgs;
1211in recurseIntoAttrs {
test/cabal-source-repo/default.nix−1
@@ -6,7 +6,6 @@ let
66 project = cabalProject' {
77 inherit compiler-nix-name;
88 src = testSrc "cabal-source-repo";
9− modules = [{ reinstallableLibGhc = true; }];
109 };
1110 packages = project.hsPkgs;
1211in recurseIntoAttrs {
test/cabal-sublib/default.nix−1
@@ -6,7 +6,6 @@ with lib;
66let
77 modules = [
88 {
9− reinstallableLibGhc = true;
109 # Package has no exposed modules which causes
1110 # haddock: No input file(s)
1211 packages.cabal-sublib.doHaddock = false;
test/call-cabal-project-to-nix/default.nix−1
@@ -18,7 +18,6 @@ let
1818 plan-pkgs = importAndFilterProject {
1919 inherit (callProjectResults) projectNix sourceRepos src;
2020 };
21− modules = [{ reinstallableLibGhc = true; }];
2221 };
2322 packages = pkgSet.config.hsPkgs;
2423
test/haskell-language-server/cabal.nix+1−1
@@ -1,6 +1,6 @@
11{ stdenv, testSrc, evalPackages, haskell-nix, compiler-nix-name, recurseIntoAttrs }:
22let
3− inherit (haskell-nix.tool compiler-nix-name "haskell-language-server" { modules = [{ reinstallableLibGhc = true; }]; }) project;
3+ inherit (haskell-nix.tool compiler-nix-name "haskell-language-server" {}) project;
44in recurseIntoAttrs {
55 ifdInputs = {
66 inherit (project) plan-nix;
test/setup-deps/default.nix+1−2
@@ -11,8 +11,7 @@ let
1111 # Package has no exposed modules which causes
1212 # haddock: No input file(s)
1313 packages.bytestring-builder.doHaddock = false;
14− }
15− { reinstallableLibGhc = true; } ];
14+ }];
1615 };
1716
1817 meta = {
test/th-dlls/default.nix−1
@@ -7,7 +7,6 @@ let
77 project = project' {
88 inherit compiler-nix-name;
99 src = testSrc "th-dlls";
10− modules = [{ reinstallableLibGhc = true; }];
1110 };
1211
1312 packages = project.hsPkgs;