Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into armv7a
Browse files Browse the repository at this point in the history
# Conflicts:
#	test/gi-gtk/default.nix
  • Loading branch information
hamishmack committed Jan 7, 2025
2 parents 917ce14 + 9261dd9 commit b3ee2d8
Show file tree
Hide file tree
Showing 17 changed files with 204 additions and 55 deletions.
2 changes: 1 addition & 1 deletion build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in rec {
pkgs.recurseIntoAttrs ({
cabal-latest = tool compiler-nix-name "cabal" ({
inherit evalPackages;
} // pkgs.lib.optionalAttrs (ghcFromTo "9.12" "9.13") {
} // pkgs.lib.optionalAttrs (ghcFromTo "9.13" "9.14") {
cabalProjectLocal = builtins.readFile ./test/cabal.project.local;
});
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.8" < 0) {
Expand Down
1 change: 1 addition & 0 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
ghc98llvm = false;
ghc910 = true;
ghc910llvm = true;
ghc9121 = true;
ghc912X = true;
ghc913 = true;
})));
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lazy-inputs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ in {
inherit ((callFlake { pkgs = final; src = ./ghc983; }).defaultNix) ghc983;
inherit ((callFlake { pkgs = final; src = ./ghc984; }).defaultNix) ghc984;
inherit ((callFlake { pkgs = final; src = ./ghc9101; }).defaultNix) ghc9101;
inherit ((callFlake { pkgs = final; src = ./ghc9121; }).defaultNix) ghc9121;
inherit ((callFlake { pkgs = final; src = ./ghc912X; }).defaultNix) ghc912X;
inherit ((callFlake { pkgs = final; src = ./ghc913; }).defaultNix) ghc913;
} // prev.haskell-nix.sources;
Expand Down
30 changes: 30 additions & 0 deletions lazy-inputs/ghc9121/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions lazy-inputs/ghc9121/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
description = "Lazy Input for Haskell.nix";

inputs = {
ghc9121 = {
flake = false;
url = "git+https://github.com/stable-haskell/ghc?ref=ghc-9.12.1-iog&submodules=1";
};
};

outputs = inputs: inputs;
}
8 changes: 4 additions & 4 deletions lazy-inputs/ghc912X/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lazy-inputs/ghc913/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions lib/call-cabal-project-to-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -517,18 +517,18 @@ let
json_cabal_file=$(mktemp)
cabal2json $fixed_cabal_file > $json_cabal_file
exposed_modules="$(jq -r '.library."exposed-modules"[]|select(type=="array")[]' $json_cabal_file)"
reexported_modules="$(jq -r '.library."reexported-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file)"
exposed_modules="$(jq -r '.library."exposed-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file)"
reexported_modules="$(jq -r '.library."reexported-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file | sed 's/.* as //g')"
# FIXME This is a bandaid. Rather than doing this, conditionals should be interpreted.
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isGhcjs ''
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
''}
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isWindows ''
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
''}
${pkgs.lib.optionalString (!pkgs.stdenv.targetPlatform.isWindows) ''
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
''}
EXPOSED_MODULES_${varname name}="$(tr '\n' ' ' <<< "$exposed_modules $reexported_modules")"
Expand Down
39 changes: 39 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc9101-ghcjs/ghc-toolchain.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc9101/ghc-toolchain.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 38 additions & 3 deletions overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ let
"9.6" = "9.6.6";
"9.8" = "9.8.4";
"9.10" = "9.10.1";
"9.12" = "9.12.1";
};
gitInputs = {
ghc912X = "9.12.0";
ghc912X = "9.12.1";
ghc913 = "9.13";
};
versionToNixName = v: "ghc${builtins.replaceStrings ["."] [""] v}";
Expand Down Expand Up @@ -939,6 +940,38 @@ in {

ghc-patches = ghc-patches "9.10.1";
});
ghc9121 = traceWarnOld "9.12" (final.callPackage ../compiler/ghc {
extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc9121; };

bootPkgs = bootPkgsGhc94 // {
ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform
then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9121
else final.buildPackages.buildPackages.haskell.compiler.ghc9121
or final.buildPackages.buildPackages.haskell.compiler.ghc9101
or final.buildPackages.buildPackages.haskell.compiler.ghc984
or final.buildPackages.buildPackages.haskell.compiler.ghc983
or final.buildPackages.buildPackages.haskell.compiler.ghc982
or final.buildPackages.buildPackages.haskell.compiler.ghc981
or final.buildPackages.buildPackages.haskell.compiler.ghc966
or final.buildPackages.buildPackages.haskell.compiler.ghc965
or final.buildPackages.buildPackages.haskell.compiler.ghc964
or final.buildPackages.buildPackages.haskell.compiler.ghc963
or final.buildPackages.buildPackages.haskell.compiler.ghc962
or final.buildPackages.buildPackages.haskell.compiler.ghc945
or final.buildPackages.buildPackages.haskell.compiler.ghc944
or final.buildPackages.buildPackages.haskell.compiler.ghc943;
};
inherit sphinx;

buildLlvmPackages = final.buildPackages.llvmPackages_15;
llvmPackages = final.llvmPackages_15;

src-spec.file = final.haskell-nix.sources.ghc9121;
src-spec.version = "9.12.1";
src-spec.needsBooting = true;

ghc-patches = ghc-patches "9.12.1";
});
} // (__listToAttrs (final.lib.mapAttrsToList (source-name: ver:
let
src = final.haskell-nix.sources.${source-name};
Expand All @@ -952,8 +985,10 @@ in {

bootPkgs = bootPkgsGhc94 // {
ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform
then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9101 # TODO use ${compiler-nix-name}
else final.buildPackages.buildPackages.haskell.compiler.ghc984
then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9121
else final.buildPackages.buildPackages.haskell.compiler.ghc9121
or final.buildPackages.buildPackages.haskell.compiler.ghc9101
or final.buildPackages.buildPackages.haskell.compiler.ghc984
or final.buildPackages.buildPackages.haskell.compiler.ghc983
or final.buildPackages.buildPackages.haskell.compiler.ghc982
or final.buildPackages.buildPackages.haskell.compiler.ghc981
Expand Down
2 changes: 2 additions & 0 deletions overlays/ghc-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ let
} // final.lib.optionalAttrs (builtins.compareVersions ghcVersion "9.9" >= 0) {
ghc-platform = "libraries/ghc-platform";
ghc-internal = "libraries/ghc-internal";
} // final.lib.optionalAttrs (builtins.compareVersions ghcVersion "9.10" >= 0) {
ghc-toolchain = "utils/ghc-toolchain";
};

# The nix produced by `cabalProject` differs slightly depending on
Expand Down
23 changes: 9 additions & 14 deletions test/cabal.project.local
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
if impl(ghc>=9.10.1)
if impl(ghc>=9.12.1)
-- allow newer packages, that are bound to be newer due to
-- being shipped with a newer compiler. If you extend this
-- be very careful to only extend it for absolutely necessary packages
-- otherwise we risk running into broken build-plans down the line.
allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal
allow-newer: *:base, *:template-haskell, *:ghc-prim

if impl(ghc > 9.11)
allow-newer: *:containers, *:time
if impl(ghc > 9.13)
allow-newer: *:containers, *:time, *:ghc-bignum
constraints: base-compat >=0.14.0, aeson >=2.2.1.0
-- From https://ghc.gitlab.haskell.org/head.hackage/cabal.constraints
constraints: extra ==1.7.14

if impl(ghc >9.13)
constraints: base-orphans <0.9.3 || >0.9.3

-- This prevents hsc2hs from causing old versions of packages from being added to plan.json
allow-newer: hsc2hs:*

if impl(ghc >=9.10.1)
extra-packages: process

repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
Expand All @@ -28,7 +23,7 @@ repository head.hackage.ghc.haskell.org
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
--sha256: sha256-EQKpiiwoIXiM7r+bGYvQzB4vWANqO6PJaSUlt1NUIeI=
--sha256: sha256-RQS0PUBA6nAD1T0OSVFhcF7ldh+6L+cW+k96Hgo3z5s=

repository ghcjs-overlay
url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b
Expand All @@ -41,14 +36,14 @@ if os(ghcjs)
extra-packages: ghci
constraints: ghci installed

if !impl(ghc>=9.11) && !os(ghcjs)
if !impl(ghc>=9.13) && !os(ghcjs)
active-repositories: hackage.haskell.org

if impl(ghc>=9.11) && !os(ghcjs)
if impl(ghc>=9.13) && !os(ghcjs)
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org

if !impl(ghc>=9.11) && os(ghcjs)
if !impl(ghc>=9.13) && os(ghcjs)
active-repositories: hackage.haskell.org, ghcjs-overlay:override

if impl(ghc>=9.11) && os(ghcjs)
if impl(ghc>=9.13) && os(ghcjs)
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org, ghcjs-overlay:override
8 changes: 1 addition & 7 deletions test/gi-gtk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ let
inherit compiler-nix-name evalPackages;
src = testSrc "gi-gtk";
cabalProjectLocal = builtins.readFile ../cabal.project.local + ''
-- haskell-gi 0.26.12 breaks gi-gtkpixbuf
index-state: 2024-09-30T00:00:00Z
-- The overloading feature of haskell-gi makes build times very long
constraints: haskell-gi-overloading ==0.0
if impl(ghc >=9.11)
constraints: filepath source
'';
};

Expand All @@ -31,9 +27,7 @@ in recurseIntoAttrs rec {
# Cross compilation to aarch64 is also broken
|| stdenv.hostPlatform.isAarch64 && !stdenv.buildPlatform.isAarch64
# glu is marked ase broken for isAndroid
|| stdenv.hostPlatform.isAndroid
# Building profiled version of Cabal for haskell-gi is currently broken for GHC head
|| compiler-nix-name == "ghc91320241204";
|| stdenv.hostPlatform.isAndroid;

ifdInputs = {
inherit (project) plan-nix;
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in recurseIntoAttrs {

# Not sure why this breaks for ghc 8.10.7
meta.disabled = compiler-nix-name == "ghc8107"
|| builtins.elem compiler-nix-name [ "ghc912020241128" "ghc91320241204" ]
|| builtins.elem compiler-nix-name [ "ghc9121" "ghc912120241215" "ghc91320241230" ]
|| stdenv.hostPlatform.isMusl
|| stdenv.hostPlatform.isGhcjs
|| stdenv.hostPlatform.isWindows
Expand Down
Loading

0 comments on commit b3ee2d8

Please sign in to comment.