From 429923fa9d530416e88084ce8acfb8a998882c93 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 5 Sep 2025 21:18:08 +1200 Subject: [PATCH 01/33] Switch CI eval to `aarch64-darwin` --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index bc2ae32c98..e23afd2bfd 100644 --- a/ci.nix +++ b/ci.nix @@ -3,7 +3,7 @@ { ifdLevel # This is passed in from flake.nix , checkMaterialization ? false , system ? builtins.currentSystem -, evalSystem ? builtins.currentSystem or "x86_64-linux" +, evalSystem ? "aarch64-darwin" # NOTE: we apply checkMaterialization when defining nixpkgsArgs , haskellNix ? import ./default.nix { inherit system ; } }: From 44db6a3a73527e36ec0f8081e9c98b3905612192 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 8 Sep 2025 09:39:04 +1200 Subject: [PATCH 02/33] Disable TH tests for Windows and Android --- test/js-template-haskell/default.nix | 6 +++++- test/th-dlls/default.nix | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/js-template-haskell/default.nix b/test/js-template-haskell/default.nix index 16e4255dcc..3e2ddaf40d 100644 --- a/test/js-template-haskell/default.nix +++ b/test/js-template-haskell/default.nix @@ -27,7 +27,11 @@ in recurseIntoAttrs { # Not sure why this is failing with a seg fault || (builtins.elem compiler-nix-name ["ghc9102" "ghc9102llvm"] && stdenv.hostPlatform.isAndroid && stdenv.hostPlatform.isAarch32) # unhandled ELF relocation(Rel) type 10 - || (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32); + || (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) + + # Disable for now (CI machines currently hang without timing out) + || stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isAndroid + ; build = packages.js-template-haskell.components.library; check = packages.js-template-haskell.checks.test; diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index 0f96f0a6bc..21aac0a553 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -43,6 +43,9 @@ in recurseIntoAttrs { || (builtins.elem compiler-nix-name ["ghc947" "ghc948"] && haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) # We have been unable to get windows cross compilation of th-orphans to work for GHC 8.10 using the latest nixpkgs || (compiler-nix-name == "ghc8107" && stdenv.hostPlatform.isWindows) + + # Disable for now (CI machines currently hang without timing out) + || stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isAndroid ; ifdInputs = { From d17f385c180332b66e6c2d30d876d4b986dfe5a1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Sep 2025 14:17:03 +1200 Subject: [PATCH 03/33] Just test a small subset of the full CI --- ci.nix | 22 +++++++++++----------- flake.nix | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ci.nix b/ci.nix index e23afd2bfd..7fa17588b8 100644 --- a/ci.nix +++ b/ci.nix @@ -63,19 +63,19 @@ # from here (so that is no longer cached) also remove ./materialized/ghcXXX. # Update supported-ghc-versions.md to reflect any changes made here. nixpkgs.lib.optionalAttrs (builtins.elem nixpkgsName ["R2411" "R2505"]) { - ghc96 = false; - ghc98 = false; - ghc910 = false; - ghc912 = false; +# ghc96 = false; +# ghc98 = false; +# ghc910 = false; +# ghc912 = false; } // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") { - ghc96 = true; - ghc98 = true; - ghc98llvm = false; - ghc910 = true; - ghc910llvm = false; +# ghc96 = true; +# ghc98 = true; +# ghc98llvm = false; +# ghc910 = true; +# ghc910llvm = false; ghc912 = true; - ghc912llvm = true; - ghc913 = true; +# ghc912llvm = true; +# ghc913 = true; }))); crossSystems = nixpkgsName: nixpkgs: compiler-nix-name: # We need to use the actual nixpkgs version we're working with here, since the values diff --git a/flake.nix b/flake.nix index b1fa5d5af3..0abc9304ee 100644 --- a/flake.nix +++ b/flake.nix @@ -101,9 +101,9 @@ # systems supported by haskell.nix systems = [ - "x86_64-linux" +# "x86_64-linux" ] ++ (if runningHydraEvalTest then [ ] else [ - "x86_64-darwin" +# "x86_64-darwin" "aarch64-darwin" ]); @@ -252,8 +252,8 @@ cf.defaultNix.hydraJobs; in self.allJobs.${system} - // lib.optionalAttrs (ifdLevel > 2) - { nix-tools = nix-tools-hydraJobs.${system} or { }; } +# // lib.optionalAttrs (ifdLevel > 2) +# { nix-tools = nix-tools-hydraJobs.${system} or { }; } ); devShells = forEachSystemPkgs (pkgs: From d5d9aaf33af9ebc3539223d8fe76420cba3c2213 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Sep 2025 14:26:34 +1200 Subject: [PATCH 04/33] Disable hydraJobs.nix-tools --- flake.nix | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index 0abc9304ee..820c5c70ec 100644 --- a/flake.nix +++ b/flake.nix @@ -286,21 +286,21 @@ ( let pkgs = nixpkgs.legacyPackages."x86_64-linux"; in { - hydraJobs.nix-tools = pkgs.releaseTools.aggregate { - name = "nix-tools"; - constituents = (if runningHydraEvalTest then [ ] else [ - "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" - "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" - "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" - "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" - ]) ++ [ - "x86_64-linux.nix-tools.static.zipped.nix-tools-static" - "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64" - "x86_64-linux.nix-tools.static.zipped.nix-tools-static-no-ifd" - "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64-no-ifd" - (pkgs.writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000")) - ]; - }; +# hydraJobs.nix-tools = pkgs.releaseTools.aggregate { +# name = "nix-tools"; +# constituents = (if runningHydraEvalTest then [ ] else [ +# "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" +# "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" +# "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" +# "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" +# ]) ++ [ +# "x86_64-linux.nix-tools.static.zipped.nix-tools-static" +# "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64" +# "x86_64-linux.nix-tools.static.zipped.nix-tools-static-no-ifd" +# "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64-no-ifd" +# (pkgs.writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000")) +# ]; +# }; } ))); From 2b8464c966da2c392c19358009e4f1d8aecb539f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Sep 2025 14:34:19 +1200 Subject: [PATCH 05/33] Trigger some IFDs --- test/cabal.project.local | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cabal.project.local b/test/cabal.project.local index b84eb85d66..6f21592266 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -1,3 +1,4 @@ +-- Test IFDs 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 From 20c49db35f9acc4f5a76da601049bbf98a429df4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Sep 2025 16:05:21 +1200 Subject: [PATCH 06/33] Trigger some IFDs --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 6f21592266..5474a24852 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -1,4 +1,4 @@ --- Test IFDs +-- Test IFDs 2 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 From 068d175cd0e55fd5b3a441896b9522415f2d96d7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Sep 2025 16:11:10 +1200 Subject: [PATCH 07/33] Trigger some IFDs --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 5474a24852..56cbdda7c4 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -1,4 +1,4 @@ --- Test IFDs 2 +-- Test IFDs 3 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 From 7a6e74658d510a8522dc15a605ed6b342dcec3e3 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 10 Sep 2025 11:28:56 +1200 Subject: [PATCH 08/33] Trigger some IFDs --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 56cbdda7c4..d61cfd5ab4 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -1,4 +1,4 @@ --- Test IFDs 3 +-- Test IFDs 4 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 From 4f7c67ed486293a6457657bc4e4712f7d27c3b55 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 10 Sep 2025 16:50:45 +1200 Subject: [PATCH 09/33] Trigger some IFDs --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index d61cfd5ab4..66c360ba84 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -1,4 +1,4 @@ --- Test IFDs 4 +-- Test IFDs 5 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 From 2d3109e67756bf9b219d0a7c97ea5546b1442eb6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Sep 2025 23:13:11 +1200 Subject: [PATCH 10/33] Turn all the CI back on --- ci.nix | 22 +++++++++++----------- flake.nix | 38 +++++++++++++++++++------------------- test/cabal.project.local | 1 - 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/ci.nix b/ci.nix index 7fa17588b8..e23afd2bfd 100644 --- a/ci.nix +++ b/ci.nix @@ -63,19 +63,19 @@ # from here (so that is no longer cached) also remove ./materialized/ghcXXX. # Update supported-ghc-versions.md to reflect any changes made here. nixpkgs.lib.optionalAttrs (builtins.elem nixpkgsName ["R2411" "R2505"]) { -# ghc96 = false; -# ghc98 = false; -# ghc910 = false; -# ghc912 = false; + ghc96 = false; + ghc98 = false; + ghc910 = false; + ghc912 = false; } // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") { -# ghc96 = true; -# ghc98 = true; -# ghc98llvm = false; -# ghc910 = true; -# ghc910llvm = false; + ghc96 = true; + ghc98 = true; + ghc98llvm = false; + ghc910 = true; + ghc910llvm = false; ghc912 = true; -# ghc912llvm = true; -# ghc913 = true; + ghc912llvm = true; + ghc913 = true; }))); crossSystems = nixpkgsName: nixpkgs: compiler-nix-name: # We need to use the actual nixpkgs version we're working with here, since the values diff --git a/flake.nix b/flake.nix index 820c5c70ec..b1fa5d5af3 100644 --- a/flake.nix +++ b/flake.nix @@ -101,9 +101,9 @@ # systems supported by haskell.nix systems = [ -# "x86_64-linux" + "x86_64-linux" ] ++ (if runningHydraEvalTest then [ ] else [ -# "x86_64-darwin" + "x86_64-darwin" "aarch64-darwin" ]); @@ -252,8 +252,8 @@ cf.defaultNix.hydraJobs; in self.allJobs.${system} -# // lib.optionalAttrs (ifdLevel > 2) -# { nix-tools = nix-tools-hydraJobs.${system} or { }; } + // lib.optionalAttrs (ifdLevel > 2) + { nix-tools = nix-tools-hydraJobs.${system} or { }; } ); devShells = forEachSystemPkgs (pkgs: @@ -286,21 +286,21 @@ ( let pkgs = nixpkgs.legacyPackages."x86_64-linux"; in { -# hydraJobs.nix-tools = pkgs.releaseTools.aggregate { -# name = "nix-tools"; -# constituents = (if runningHydraEvalTest then [ ] else [ -# "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" -# "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" -# "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" -# "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" -# ]) ++ [ -# "x86_64-linux.nix-tools.static.zipped.nix-tools-static" -# "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64" -# "x86_64-linux.nix-tools.static.zipped.nix-tools-static-no-ifd" -# "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64-no-ifd" -# (pkgs.writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000")) -# ]; -# }; + hydraJobs.nix-tools = pkgs.releaseTools.aggregate { + name = "nix-tools"; + constituents = (if runningHydraEvalTest then [ ] else [ + "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" + "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" + "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" + "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" + ]) ++ [ + "x86_64-linux.nix-tools.static.zipped.nix-tools-static" + "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64" + "x86_64-linux.nix-tools.static.zipped.nix-tools-static-no-ifd" + "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64-no-ifd" + (pkgs.writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000")) + ]; + }; } ))); diff --git a/test/cabal.project.local b/test/cabal.project.local index 66c360ba84..b84eb85d66 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -1,4 +1,3 @@ --- Test IFDs 5 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 From 583c8a07b66c37552c24a2e851f1eb746b9912a4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 12 Sep 2025 15:05:19 +1200 Subject: [PATCH 11/33] Disable test broken on current CI --- test/th-dlls-minimal/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/th-dlls-minimal/default.nix b/test/th-dlls-minimal/default.nix index 0e6ccb3be7..43837f7ef1 100644 --- a/test/th-dlls-minimal/default.nix +++ b/test/th-dlls-minimal/default.nix @@ -32,7 +32,10 @@ let in recurseIntoAttrs { # This test is just for windows currently (the full th-dlls test runs on other platforms) - meta.disabled = !stdenv.hostPlatform.isWindows; + meta.disabled = !stdenv.hostPlatform.isWindows + # Disable for now (CI machines currently hang without timing out) + || stdenv.hostPlatform.isWindows + ; ifdInputs = { inherit (project true) plan-nix; From c3fcb9ca12c8d8bdf69d9262285775822e09a7a6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 12 Sep 2025 18:34:42 +1200 Subject: [PATCH 12/33] Disable tests broken on current CI --- test/js-template-haskell/default.nix | 1 + test/th-dlls/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/test/js-template-haskell/default.nix b/test/js-template-haskell/default.nix index 3e2ddaf40d..fed9d0f71a 100644 --- a/test/js-template-haskell/default.nix +++ b/test/js-template-haskell/default.nix @@ -31,6 +31,7 @@ in recurseIntoAttrs { # Disable for now (CI machines currently hang without timing out) || stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isAndroid + || (stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64) ; build = packages.js-template-haskell.components.library; diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index 21aac0a553..f4d90c9b3c 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -46,6 +46,7 @@ in recurseIntoAttrs { # Disable for now (CI machines currently hang without timing out) || stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isAndroid + || (stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64) ; ifdInputs = { From e5b28906e84e84559df77adcbeb89c6a6c7e56c9 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 15 Sep 2025 20:32:22 +1200 Subject: [PATCH 13/33] Bump nixpkgs --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 3573491f5a..b089178499 100644 --- a/flake.lock +++ b/flake.lock @@ -468,11 +468,11 @@ }, "nixpkgs-2505": { "locked": { - "lastModified": 1754477006, - "narHash": "sha256-suIgZZHXdb4ca9nN4MIcmdjeN+ZWsTwCtYAG4HExqAo=", + "lastModified": 1757716134, + "narHash": "sha256-OYoZLWvmCnCTCJQwaQlpK1IO5nkLnLLoUW8wwmPmrfU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4896699973299bffae27d0d9828226983544d9e9", + "rev": "e85b5aa112a98805a016bbf6291e726debbc448a", "type": "github" }, "original": { @@ -484,11 +484,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1754393734, - "narHash": "sha256-fbnmAwTQkuXHKBlcL5Nq1sMAzd3GFqCOQgEQw6Hy0Ak=", + "lastModified": 1757843276, + "narHash": "sha256-GNqrHTSABo9Fwvhcgq4hy4Us5OY368gIEJCI48lBWhM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a683adc19ff5228af548c6539dbc3440509bfed3", + "rev": "af745796c2755d6f3a6d835967862184d53a17ff", "type": "github" }, "original": { From 45ddb1e74da165b86e52e23606163b757fcabb1e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 15 Sep 2025 22:14:18 +1200 Subject: [PATCH 14/33] Remove dependencies on old nixpkgs ghc versions --- compiler/ghc/default.nix | 2 + .../alex-3.2.7.1/ghc967/cabal-files/alex.nix | 57 ++++++++++ materialized/alex-3.2.7.1/ghc967/default.nix | 102 ++++++++++++++++++ materialized/alex-3.2.7.1/ghc967/plan.json | 1 + .../ghc967/hscolour/cabal-files/hscolour.nix | 50 +++++++++ .../bootstrap/ghc967/hscolour/default.nix | 67 ++++++++++++ .../bootstrap/ghc967/hscolour/plan.json | 1 + .../happy-1.20.0/ghc967/cabal-files/happy.nix | 57 ++++++++++ .../happy-1.20.0/ghc967/cabal-files/mtl.nix | 41 +++++++ .../ghc967/cabal-files/transformers.nix | 40 +++++++ materialized/happy-1.20.0/ghc967/default.nix | 70 ++++++++++++ materialized/happy-1.20.0/ghc967/plan.json | 1 + overlays/bootstrap.nix | 12 ++- 13 files changed, 496 insertions(+), 5 deletions(-) create mode 100644 materialized/alex-3.2.7.1/ghc967/cabal-files/alex.nix create mode 100644 materialized/alex-3.2.7.1/ghc967/default.nix create mode 100644 materialized/alex-3.2.7.1/ghc967/plan.json create mode 100644 materialized/bootstrap/ghc967/hscolour/cabal-files/hscolour.nix create mode 100644 materialized/bootstrap/ghc967/hscolour/default.nix create mode 100644 materialized/bootstrap/ghc967/hscolour/plan.json create mode 100644 materialized/happy-1.20.0/ghc967/cabal-files/happy.nix create mode 100644 materialized/happy-1.20.0/ghc967/cabal-files/mtl.nix create mode 100644 materialized/happy-1.20.0/ghc967/cabal-files/transformers.nix create mode 100644 materialized/happy-1.20.0/ghc967/default.nix create mode 100644 materialized/happy-1.20.0/ghc967/plan.json diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 775040f4ca..3167e2123c 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -315,6 +315,8 @@ let compiler-nix-name = if builtins.compareVersions ghc-version "9.4.7" < 0 then "ghc928" + else if buildPackages.haskell.compiler ? ghc967 + then "ghc967" else if buildPackages.haskell.compiler ? ghc966 then "ghc966" else if buildPackages.haskell.compiler ? ghc964 diff --git a/materialized/alex-3.2.7.1/ghc967/cabal-files/alex.nix b/materialized/alex-3.2.7.1/ghc967/cabal-files/alex.nix new file mode 100644 index 0000000000..5a944bd139 --- /dev/null +++ b/materialized/alex-3.2.7.1/ghc967/cabal-files/alex.nix @@ -0,0 +1,57 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "alex"; version = "3.2.7.1"; }; + license = "BSD-3-Clause"; + copyright = "(c) Chis Dornan, Simon Marlow"; + maintainer = "Simon Marlow "; + author = "Chris Dornan and Simon Marlow"; + homepage = "http://www.haskell.org/alex/"; + url = ""; + synopsis = "Alex is a tool for generating lexical analysers in Haskell"; + description = "Alex is a tool for generating lexical analysers in Haskell.\nIt takes a description of tokens based on regular\nexpressions and generates a Haskell module containing code\nfor scanning text efficiently. It is similar to the tool\nlex or flex for C/C++."; + buildType = "Simple"; + }; + components = { + exes = { + "alex" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + ]; + buildable = true; + }; + }; + tests = { + "tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + ]; + build-tools = [ + (hsPkgs.pkgsBuildBuild.alex.components.exes.alex or (pkgs.pkgsBuildBuild.alex or (errorHandler.buildToolDepError "alex:alex"))) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/alex-3.2.7.1.tar.gz"; + sha256 = "9bd2f1a27e8f1b2ffdb5b2fbd3ed82b6f0e85191459a1b24ffcbef4e68a81bec"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: alex\nversion: 3.2.7.1\n-- don't forget updating changelog.md!\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: (c) Chis Dornan, Simon Marlow\nauthor: Chris Dornan and Simon Marlow\nmaintainer: Simon Marlow \nbug-reports: https://github.com/simonmar/alex/issues\nstability: stable\nhomepage: http://www.haskell.org/alex/\nsynopsis: Alex is a tool for generating lexical analysers in Haskell\ndescription:\n Alex is a tool for generating lexical analysers in Haskell.\n It takes a description of tokens based on regular\n expressions and generates a Haskell module containing code\n for scanning text efficiently. It is similar to the tool\n lex or flex for C/C++.\n\ncategory: Development\nbuild-type: Simple\n\ntested-with:\n GHC == 7.0.4\n GHC == 7.4.2\n GHC == 7.6.3\n GHC == 7.8.4\n GHC == 7.10.3\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.4\n GHC == 9.0.1\n\ndata-dir: data/\n\ndata-files:\n AlexTemplate.hs\n AlexWrappers.hs\n\nextra-source-files:\n CHANGELOG.md\n README.md\n TODO\n doc/Makefile\n doc/aclocal.m4\n doc/alex.1.in\n doc/alex.xml\n doc/config.mk.in\n doc/configure.ac\n doc/docbook-xml.mk\n doc/fptools.css\n examples/Makefile\n examples/Tokens.x\n examples/Tokens_gscan.x\n examples/Tokens_posn.x\n examples/examples.x\n examples/haskell.x\n examples/lit.x\n examples/pp.x\n examples/state.x\n examples/tiny.y\n examples/words.x\n examples/words_monad.x\n examples/words_posn.x\n src/Parser.y.boot\n src/Scan.x.boot\n src/ghc_hooks.c\n tests/Makefile\n tests/simple.x\n tests/null.x\n tests/tokens.x\n tests/tokens_gscan.x\n tests/tokens_posn.x\n tests/tokens_bytestring.x\n tests/tokens_posn_bytestring.x\n tests/tokens_scan_user.x\n tests/tokens_strict_bytestring.x\n tests/tokens_monad_bytestring.x\n tests/tokens_monadUserState_bytestring.x\n tests/tokens_bytestring_unicode.x\n tests/basic_typeclass.x\n tests/basic_typeclass_bytestring.x\n tests/default_typeclass.x\n tests/gscan_typeclass.x\n tests/posn_typeclass.x\n tests/monad_typeclass.x\n tests/monad_typeclass_bytestring.x\n tests/monadUserState_typeclass.x\n tests/monadUserState_typeclass_bytestring.x\n tests/posn_typeclass_bytestring.x\n tests/strict_typeclass.x\n tests/unicode.x\n tests/issue_71.x\n tests/issue_119.x\n tests/issue_141.x\n tests/issue_197.x\n\nsource-repository head\n type: git\n location: https://github.com/simonmar/alex.git\n\nexecutable alex\n hs-source-dirs: src\n main-is: Main.hs\n\n build-depends: base >= 2.1 && < 5\n , array\n , containers\n , directory\n\n default-language: Haskell98\n default-extensions: CPP\n other-extensions: MagicHash\n\n ghc-options: -Wall -rtsopts\n\n other-modules:\n AbsSyn\n CharSet\n DFA\n DFAMin\n DFS\n Info\n Map\n NFA\n Output\n Paths_alex\n Parser\n ParseMonad\n Scan\n Set\n Sort\n Util\n UTF8\n Data.Ranged\n Data.Ranged.Boundaries\n Data.Ranged.RangedSet\n Data.Ranged.Ranges\n\ntest-suite tests\n type: exitcode-stdio-1.0\n main-is: test.hs\n -- This line is important as it ensures that the local `exe:alex` component declared above is built before the test-suite component is invoked, as well as making sure that `alex` is made available on $PATH and `$alex_datadir` is set accordingly before invoking `test.hs`\n build-tools: alex\n\n default-language: Haskell98\n\n build-depends: base, process\n"; + } \ No newline at end of file diff --git a/materialized/alex-3.2.7.1/ghc967/default.nix b/materialized/alex-3.2.7.1/ghc967/default.nix new file mode 100644 index 0000000000..bcda3365ed --- /dev/null +++ b/materialized/alex-3.2.7.1/ghc967/default.nix @@ -0,0 +1,102 @@ +{ + pkgs = hackage: + { + packages = { + filepath.revision = hackage.filepath."1.4.301.0".revisions.default; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + directory.revision = hackage.directory."1.3.8.5".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + base.revision = hackage.base."4.18.3.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + array.revision = hackage.array."0.5.8.0".revisions.default; + alex.revision = import ./cabal-files/alex.nix; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + unix.revision = hackage.unix."2.8.6.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + bytestring.revision = hackage.bytestring."0.11.5.4".revisions.default; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.7".revisions.default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + containers.revision = hackage.containers."0.6.7".revisions.default; + }; + compiler = { + version = "9.6.7"; + nix-name = "ghc967"; + packages = { + "ghc-boot-th" = "9.6.7"; + "pretty" = "1.1.3.6"; + "array" = "0.5.8.0"; + "time" = "1.12.2"; + "ghc-prim" = "0.10.0"; + "bytestring" = "0.11.5.4"; + "mtl" = "2.3.1"; + "template-haskell" = "2.20.0.0"; + "ghc-bignum" = "1.3"; + "stm" = "2.5.1.0"; + "filepath" = "1.4.301.0"; + "unix" = "2.8.6.0"; + "exceptions" = "0.10.7"; + "deepseq" = "1.4.8.1"; + "transformers" = "0.6.1.0"; + "containers" = "0.6.7"; + "base" = "4.18.3.0"; + "directory" = "1.3.8.5"; + }; + }; + }; + extras = hackage: + { packages = {}; }; + modules = [ + { + preExistingPkgs = [ + "filepath" + "ghc-bignum" + "stm" + "transformers" + "deepseq" + "directory" + "mtl" + "base" + "time" + "array" + "template-haskell" + "unix" + "exceptions" + "bytestring" + "ghc-boot-th" + "ghc-prim" + "pretty" + "containers" + ]; + } + ({ lib, ... }: + { packages = {}; }) + ({ lib, ... }: + { + packages = { + "alex".components.exes."alex".planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "unix".components.library.planned = lib.mkOverride 900 true; + "exceptions".components.library.planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/alex-3.2.7.1/ghc967/plan.json b/materialized/alex-3.2.7.1/ghc967/plan.json new file mode 100644 index 0000000000..10bd38a419 --- /dev/null +++ b/materialized/alex-3.2.7.1/ghc967/plan.json @@ -0,0 +1 @@ +{"cabal-version":"3.14.2.0","cabal-lib-version":"3.14.2.0","compiler-id":"ghc-9.6.7","os":"osx","arch":"aarch64","install-plan":[{"type":"pre-existing","id":"array-0.5.8.0","pkg-name":"array","pkg-version":"0.5.8.0","depends":["base-4.18.3.0"]},{"type":"pre-existing","id":"base-4.18.3.0","pkg-name":"base","pkg-version":"4.18.3.0","depends":["ghc-prim-0.10.0","ghc-bignum-1.3"]},{"type":"pre-existing","id":"bytestring-0.11.5.4","pkg-name":"bytestring","pkg-version":"0.11.5.4","depends":["base-4.18.3.0","ghc-prim-0.10.0","deepseq-1.4.8.1","template-haskell-2.20.0.0"]},{"type":"pre-existing","id":"containers-0.6.7","pkg-name":"containers","pkg-version":"0.6.7","depends":["base-4.18.3.0","array-0.5.8.0","deepseq-1.4.8.1","template-haskell-2.20.0.0"]},{"type":"pre-existing","id":"deepseq-1.4.8.1","pkg-name":"deepseq","pkg-version":"1.4.8.1","depends":["base-4.18.3.0","array-0.5.8.0"]},{"type":"pre-existing","id":"directory-1.3.8.5","pkg-name":"directory","pkg-version":"1.3.8.5","depends":["base-4.18.3.0","time-1.12.2","filepath-1.4.301.0","unix-2.8.6.0"]},{"type":"pre-existing","id":"exceptions-0.10.7","pkg-name":"exceptions","pkg-version":"0.10.7","depends":["base-4.18.3.0","stm-2.5.1.0","template-haskell-2.20.0.0","mtl-2.3.1","transformers-0.6.1.0"]},{"type":"pre-existing","id":"filepath-1.4.301.0","pkg-name":"filepath","pkg-version":"1.4.301.0","depends":["base-4.18.3.0","bytestring-0.11.5.4","deepseq-1.4.8.1","exceptions-0.10.7","template-haskell-2.20.0.0"]},{"type":"pre-existing","id":"ghc-bignum-1.3","pkg-name":"ghc-bignum","pkg-version":"1.3","depends":["ghc-prim-0.10.0"]},{"type":"pre-existing","id":"ghc-boot-th-9.6.7","pkg-name":"ghc-boot-th","pkg-version":"9.6.7","depends":["base-4.18.3.0"]},{"type":"pre-existing","id":"ghc-prim-0.10.0","pkg-name":"ghc-prim","pkg-version":"0.10.0","depends":[]},{"type":"configured","id":"lx-3.2.7.1-0976ef54","pkg-name":"alex","pkg-version":"3.2.7.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"ab26a38cefae59403f746370e5a0c943b8d5bda098eb83f37052b2429ee780ce","pkg-src-sha256":"9bd2f1a27e8f1b2ffdb5b2fbd3ed82b6f0e85191459a1b24ffcbef4e68a81bec","depends":["array-0.5.8.0","base-4.18.3.0","containers-0.6.7","directory-1.3.8.5"],"exe-depends":[],"component-name":"exe:alex","bin-file":"/store/ghc-9.6.7/lx-3.2.7.1-0976ef54/bin/alex"},{"type":"pre-existing","id":"mtl-2.3.1","pkg-name":"mtl","pkg-version":"2.3.1","depends":["base-4.18.3.0","transformers-0.6.1.0"]},{"type":"pre-existing","id":"pretty-1.1.3.6","pkg-name":"pretty","pkg-version":"1.1.3.6","depends":["base-4.18.3.0","deepseq-1.4.8.1","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"stm-2.5.1.0","pkg-name":"stm","pkg-version":"2.5.1.0","depends":["base-4.18.3.0","array-0.5.8.0"]},{"type":"pre-existing","id":"template-haskell-2.20.0.0","pkg-name":"template-haskell","pkg-version":"2.20.0.0","depends":["base-4.18.3.0","ghc-boot-th-9.6.7","ghc-prim-0.10.0","pretty-1.1.3.6"]},{"type":"pre-existing","id":"time-1.12.2","pkg-name":"time","pkg-version":"1.12.2","depends":["base-4.18.3.0","deepseq-1.4.8.1"]},{"type":"pre-existing","id":"transformers-0.6.1.0","pkg-name":"transformers","pkg-version":"0.6.1.0","depends":["base-4.18.3.0"]},{"type":"pre-existing","id":"unix-2.8.6.0","pkg-name":"unix","pkg-version":"2.8.6.0","depends":["base-4.18.3.0","bytestring-0.11.5.4","time-1.12.2","filepath-1.4.301.0"]}],"targets":[{"pkg-name":"alex","pkg-version":"3.2.7.1","component-name":"exe:alex","available":[{"id":"lx-3.2.7.1-0976ef54","component-name":"exe:alex","build-by-default":true}]},{"pkg-name":"alex","pkg-version":"3.2.7.1","component-name":"test:tests","available":["TargetNotLocal"]},{"pkg-name":"array","pkg-version":"0.5.8.0","component-name":"lib","available":[{"id":"array-0.5.8.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"base","pkg-version":"4.18.3.0","component-name":"lib","available":[{"id":"base-4.18.3.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"bytestring","pkg-version":"0.11.5.4","component-name":"lib","available":[{"id":"bytestring-0.11.5.4","component-name":"lib","build-by-default":true}]},{"pkg-name":"containers","pkg-version":"0.6.7","component-name":"lib","available":[{"id":"containers-0.6.7","component-name":"lib","build-by-default":true}]},{"pkg-name":"deepseq","pkg-version":"1.4.8.1","component-name":"lib","available":[{"id":"deepseq-1.4.8.1","component-name":"lib","build-by-default":true}]},{"pkg-name":"directory","pkg-version":"1.3.8.5","component-name":"lib","available":[{"id":"directory-1.3.8.5","component-name":"lib","build-by-default":true}]},{"pkg-name":"exceptions","pkg-version":"0.10.7","component-name":"lib","available":[{"id":"exceptions-0.10.7","component-name":"lib","build-by-default":true}]},{"pkg-name":"filepath","pkg-version":"1.4.301.0","component-name":"lib","available":[{"id":"filepath-1.4.301.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-bignum","pkg-version":"1.3","component-name":"lib","available":[{"id":"ghc-bignum-1.3","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-boot-th","pkg-version":"9.6.7","component-name":"lib","available":[{"id":"ghc-boot-th-9.6.7","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-prim","pkg-version":"0.10.0","component-name":"lib","available":[{"id":"ghc-prim-0.10.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"mtl","pkg-version":"2.3.1","component-name":"lib","available":[{"id":"mtl-2.3.1","component-name":"lib","build-by-default":true}]},{"pkg-name":"pretty","pkg-version":"1.1.3.6","component-name":"lib","available":[{"id":"pretty-1.1.3.6","component-name":"lib","build-by-default":true}]},{"pkg-name":"stm","pkg-version":"2.5.1.0","component-name":"lib","available":[{"id":"stm-2.5.1.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"template-haskell","pkg-version":"2.20.0.0","component-name":"lib","available":[{"id":"template-haskell-2.20.0.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"time","pkg-version":"1.12.2","component-name":"lib","available":[{"id":"time-1.12.2","component-name":"lib","build-by-default":true}]},{"pkg-name":"transformers","pkg-version":"0.6.1.0","component-name":"lib","available":[{"id":"transformers-0.6.1.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"unix","pkg-version":"2.8.6.0","component-name":"lib","available":[{"id":"unix-2.8.6.0","component-name":"lib","build-by-default":true}]}]} \ No newline at end of file diff --git a/materialized/bootstrap/ghc967/hscolour/cabal-files/hscolour.nix b/materialized/bootstrap/ghc967/hscolour/cabal-files/hscolour.nix new file mode 100644 index 0000000000..406929b592 --- /dev/null +++ b/materialized/bootstrap/ghc967/hscolour/cabal-files/hscolour.nix @@ -0,0 +1,50 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.6"; + identifier = { name = "hscolour"; version = "1.24.4"; }; + license = "LicenseRef-LGPL"; + copyright = "2003-2017 Malcolm Wallace; 2006 Bjorn Bringert"; + maintainer = "Malcolm Wallace"; + author = "Malcolm Wallace"; + homepage = "http://code.haskell.org/~malcolm/hscolour/"; + url = ""; + synopsis = "Colourise Haskell code."; + description = "hscolour is a small Haskell script to colourise Haskell code. It currently\nhas six output formats:\nANSI terminal codes (optionally XTerm-256colour codes),\nHTML 3.2 with tags,\nHTML 4.01 with CSS,\nHTML 4.01 with CSS and mouseover annotations,\nXHTML 1.0 with inline CSS styling,\nLaTeX,\nand mIRC chat codes."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ]; + buildable = true; + }; + exes = { + "HsColour" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hscolour-1.24.4.tar.gz"; + sha256 = "243332b082294117f37b2c2c68079fa61af68b36223b3fc07594f245e0e5321d"; + }); + }) // { + package-description-override = "Name: hscolour\nVersion: 1.24.4\nCopyright: 2003-2017 Malcolm Wallace; 2006 Bjorn Bringert\nMaintainer: Malcolm Wallace\nAuthor: Malcolm Wallace\nHomepage: http://code.haskell.org/~malcolm/hscolour/\nLicense: LGPL\nLicense-file: LICENCE-LGPL\nSynopsis: Colourise Haskell code.\nDescription:\n hscolour is a small Haskell script to colourise Haskell code. It currently\n has six output formats: \n ANSI terminal codes (optionally XTerm-256colour codes),\n HTML 3.2 with tags,\n HTML 4.01 with CSS,\n HTML 4.01 with CSS and mouseover annotations,\n XHTML 1.0 with inline CSS styling,\n LaTeX,\n and mIRC chat codes.\nCategory: Language\nBuild-Type: Simple\nData-files: hscolour.css, data/rgb24-example-.hscolour\nCabal-version: >=1.6\n\n\nLibrary\n Build-depends: base < 10, containers\n Exposed-Modules: \n Language.Haskell.HsColour\n Language.Haskell.HsColour.ANSI\n Language.Haskell.HsColour.Anchors\n Language.Haskell.HsColour.ACSS\n Language.Haskell.HsColour.CSS\n Language.Haskell.HsColour.Classify\n Language.Haskell.HsColour.ColourHighlight\n Language.Haskell.HsColour.Colourise\n Language.Haskell.HsColour.General\n Language.Haskell.HsColour.HTML\n Language.Haskell.HsColour.InlineCSS\n Language.Haskell.HsColour.LaTeX\n Language.Haskell.HsColour.MIRC\n Language.Haskell.HsColour.Options\n Language.Haskell.HsColour.Output\n Language.Haskell.HsColour.TTY\n --ghc-options: -O -W\n Extensions: \n\n\nExecutable HsColour\n Build-depends: base < 10, containers\n Main-is: HsColour.hs\n --ghc-options: -O -W\n Extensions: CPP\n cpp-options: -DMAJOR=1 -DMINOR=24\n\n\n\nSource-repository head\n Type : darcs\n Location: http://code.haskell.org/~malcolm/hscolour\n"; + } \ No newline at end of file diff --git a/materialized/bootstrap/ghc967/hscolour/default.nix b/materialized/bootstrap/ghc967/hscolour/default.nix new file mode 100644 index 0000000000..af8972d913 --- /dev/null +++ b/materialized/bootstrap/ghc967/hscolour/default.nix @@ -0,0 +1,67 @@ +{ + pkgs = hackage: + { + packages = { + hscolour.revision = import ./cabal-files/hscolour.nix; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + base.revision = hackage.base."4.18.3.0".revisions.default; + array.revision = hackage.array."0.5.8.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.7".revisions.default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + containers.revision = hackage.containers."0.6.7".revisions.default; + }; + compiler = { + version = "9.6.7"; + nix-name = "ghc967"; + packages = { + "ghc-boot-th" = "9.6.7"; + "pretty" = "1.1.3.6"; + "array" = "0.5.8.0"; + "ghc-prim" = "0.10.0"; + "template-haskell" = "2.20.0.0"; + "ghc-bignum" = "1.3"; + "deepseq" = "1.4.8.1"; + "containers" = "0.6.7"; + "base" = "4.18.3.0"; + }; + }; + }; + extras = hackage: + { packages = {}; }; + modules = [ + { + preExistingPkgs = [ + "ghc-bignum" + "deepseq" + "base" + "array" + "template-haskell" + "ghc-boot-th" + "ghc-prim" + "pretty" + "containers" + ]; + } + ({ lib, ... }: + { packages = {}; }) + ({ lib, ... }: + { + packages = { + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "hscolour".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "hscolour".components.exes."HsColour".planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/bootstrap/ghc967/hscolour/plan.json b/materialized/bootstrap/ghc967/hscolour/plan.json new file mode 100644 index 0000000000..436b6a79ee --- /dev/null +++ b/materialized/bootstrap/ghc967/hscolour/plan.json @@ -0,0 +1 @@ +{"cabal-version":"3.14.2.0","cabal-lib-version":"3.14.2.0","compiler-id":"ghc-9.6.7","os":"osx","arch":"aarch64","install-plan":[{"type":"pre-existing","id":"array-0.5.8.0","pkg-name":"array","pkg-version":"0.5.8.0","depends":["base-4.18.3.0"]},{"type":"pre-existing","id":"base-4.18.3.0","pkg-name":"base","pkg-version":"4.18.3.0","depends":["ghc-prim-0.10.0","ghc-bignum-1.3"]},{"type":"pre-existing","id":"containers-0.6.7","pkg-name":"containers","pkg-version":"0.6.7","depends":["base-4.18.3.0","array-0.5.8.0","deepseq-1.4.8.1","template-haskell-2.20.0.0"]},{"type":"pre-existing","id":"deepseq-1.4.8.1","pkg-name":"deepseq","pkg-version":"1.4.8.1","depends":["base-4.18.3.0","array-0.5.8.0"]},{"type":"pre-existing","id":"ghc-bignum-1.3","pkg-name":"ghc-bignum","pkg-version":"1.3","depends":["ghc-prim-0.10.0"]},{"type":"pre-existing","id":"ghc-boot-th-9.6.7","pkg-name":"ghc-boot-th","pkg-version":"9.6.7","depends":["base-4.18.3.0"]},{"type":"pre-existing","id":"ghc-prim-0.10.0","pkg-name":"ghc-prim","pkg-version":"0.10.0","depends":[]},{"type":"configured","id":"hsclr-1.24.4-29561872","pkg-name":"hscolour","pkg-version":"1.24.4","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"3a329fa0ea9138f651088f1fa25522aabeab0eb591932d3fd56c66736bbe78be","pkg-src-sha256":"243332b082294117f37b2c2c68079fa61af68b36223b3fc07594f245e0e5321d","components":{"lib":{"depends":["base-4.18.3.0","containers-0.6.7"],"exe-depends":[]},"exe:HsColour":{"depends":["base-4.18.3.0","containers-0.6.7"],"exe-depends":[],"bin-file":"/store/ghc-9.6.7/hsclr-1.24.4-29561872/bin/HsColour"}}},{"type":"pre-existing","id":"pretty-1.1.3.6","pkg-name":"pretty","pkg-version":"1.1.3.6","depends":["base-4.18.3.0","deepseq-1.4.8.1","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"template-haskell-2.20.0.0","pkg-name":"template-haskell","pkg-version":"2.20.0.0","depends":["base-4.18.3.0","ghc-boot-th-9.6.7","ghc-prim-0.10.0","pretty-1.1.3.6"]}],"targets":[{"pkg-name":"array","pkg-version":"0.5.8.0","component-name":"lib","available":[{"id":"array-0.5.8.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"base","pkg-version":"4.18.3.0","component-name":"lib","available":[{"id":"base-4.18.3.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"containers","pkg-version":"0.6.7","component-name":"lib","available":[{"id":"containers-0.6.7","component-name":"lib","build-by-default":true}]},{"pkg-name":"deepseq","pkg-version":"1.4.8.1","component-name":"lib","available":[{"id":"deepseq-1.4.8.1","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-bignum","pkg-version":"1.3","component-name":"lib","available":[{"id":"ghc-bignum-1.3","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-boot-th","pkg-version":"9.6.7","component-name":"lib","available":[{"id":"ghc-boot-th-9.6.7","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-prim","pkg-version":"0.10.0","component-name":"lib","available":[{"id":"ghc-prim-0.10.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"hscolour","pkg-version":"1.24.4","component-name":"lib","available":[{"id":"hsclr-1.24.4-29561872","component-name":"lib","build-by-default":true}]},{"pkg-name":"hscolour","pkg-version":"1.24.4","component-name":"exe:HsColour","available":[{"id":"hsclr-1.24.4-29561872","component-name":"exe:HsColour","build-by-default":true}]},{"pkg-name":"pretty","pkg-version":"1.1.3.6","component-name":"lib","available":[{"id":"pretty-1.1.3.6","component-name":"lib","build-by-default":true}]},{"pkg-name":"template-haskell","pkg-version":"2.20.0.0","component-name":"lib","available":[{"id":"template-haskell-2.20.0.0","component-name":"lib","build-by-default":true}]}]} \ No newline at end of file diff --git a/materialized/happy-1.20.0/ghc967/cabal-files/happy.nix b/materialized/happy-1.20.0/ghc967/cabal-files/happy.nix new file mode 100644 index 0000000000..f4e54974aa --- /dev/null +++ b/materialized/happy-1.20.0/ghc967/cabal-files/happy.nix @@ -0,0 +1,57 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "happy"; version = "1.20.0"; }; + license = "BSD-2-Clause"; + copyright = "(c) Andy Gill, Simon Marlow"; + maintainer = "Simon Marlow "; + author = "Andy Gill and Simon Marlow"; + homepage = "https://www.haskell.org/happy/"; + url = ""; + synopsis = "Happy is a parser generator for Haskell"; + description = "Happy is a parser generator for Haskell. Given a grammar\nspecification in BNF, Happy generates Haskell code to parse the\ngrammar. Happy works in a similar way to the @yacc@ tool for C."; + buildType = "Simple"; + }; + components = { + exes = { + "happy" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + ]; + buildable = true; + }; + }; + tests = { + "tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + ]; + build-tools = [ + (hsPkgs.pkgsBuildBuild.happy.components.exes.happy or (pkgs.pkgsBuildBuild.happy or (errorHandler.buildToolDepError "happy:happy"))) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/happy-1.20.0.tar.gz"; + sha256 = "3b1d3a8f93a2723b554d9f07b2cd136be1a7b2fcab1855b12b7aab5cbac8868c"; + }); + }) // { + package-description-override = "name: happy\nversion: 1.20.0\nx-revision: 1\nlicense: BSD2\nlicense-file: LICENSE\ncopyright: (c) Andy Gill, Simon Marlow\nauthor: Andy Gill and Simon Marlow\nmaintainer: Simon Marlow \nbug-reports: https://github.com/simonmar/happy/issues\nstability: stable\nhomepage: https://www.haskell.org/happy/\nsynopsis: Happy is a parser generator for Haskell\ncategory: Development\ncabal-version: >= 1.10\nbuild-type: Simple\n\nDescription:\n Happy is a parser generator for Haskell. Given a grammar\n specification in BNF, Happy generates Haskell code to parse the\n grammar. Happy works in a similar way to the @yacc@ tool for C.\n\ntested-with:\n GHC==7.10.3,\n GHC==8.0.2,\n GHC==8.2.2,\n GHC==8.4.4,\n GHC==8.6.5,\n GHC==8.8.1\n\ndata-dir: data/\n\ndata-files:\n HappyTemplate\n HappyTemplate-arrays\n HappyTemplate-arrays-coerce\n HappyTemplate-arrays-coerce-debug\n HappyTemplate-arrays-debug\n HappyTemplate-arrays-ghc\n HappyTemplate-arrays-ghc-debug\n HappyTemplate-coerce\n HappyTemplate-ghc\n GLR_Base\n GLR_Lib\n GLR_Lib-ghc\n GLR_Lib-ghc-debug\n\nextra-source-files:\n ANNOUNCE\n CHANGES\n Makefile\n README.md\n TODO\n doc/Makefile\n doc/aclocal.m4\n doc/config.mk.in\n doc/configure.ac\n doc/docbook-xml.mk\n doc/fptools.css\n doc/happy.1.in\n doc/happy.xml\n examples/glr/nlp/Main.lhs\n examples/glr/nlp/Makefile\n examples/glr/nlp/README\n examples/glr/nlp/English.y\n examples/glr/nlp/Hugs.lhs\n examples/glr/Makefile\n examples/glr/Makefile.defs\n examples/glr/expr-eval/Main.lhs\n examples/glr/expr-eval/Makefile\n examples/glr/expr-eval/Expr.y\n examples/glr/expr-eval/README\n examples/glr/expr-eval/Hugs.lhs\n examples/glr/expr-tree/Main.lhs\n examples/glr/expr-tree/Makefile\n examples/glr/expr-tree/Expr.y\n examples/glr/expr-tree/README\n examples/glr/expr-tree/Tree.lhs\n examples/glr/expr-tree/Hugs.lhs\n examples/glr/highly-ambiguous/Main.lhs\n examples/glr/highly-ambiguous/Makefile\n examples/glr/highly-ambiguous/Expr.y\n examples/glr/highly-ambiguous/README\n examples/glr/highly-ambiguous/Hugs.lhs\n examples/glr/hidden-leftrec/Main.lhs\n examples/glr/hidden-leftrec/Makefile\n examples/glr/hidden-leftrec/Expr.y\n examples/glr/hidden-leftrec/README\n examples/glr/hidden-leftrec/Hugs.lhs\n examples/glr/expr-monad/Main.lhs\n examples/glr/expr-monad/Makefile\n examples/glr/expr-monad/Expr.y\n examples/glr/expr-monad/README\n examples/glr/expr-monad/Hugs.lhs\n examples/glr/bio-eg/Main.lhs\n examples/glr/bio-eg/Makefile\n examples/glr/bio-eg/Bio.y\n examples/glr/bio-eg/README\n examples/glr/bio-eg/1-1200.dna\n examples/glr/bio-eg/1-600.dna\n examples/glr/common/DV_lhs\n examples/glr/common/DaVinciTypes.hs\n examples/glr/packing/Main.lhs\n examples/glr/packing/Makefile\n examples/glr/packing/Expr.y\n examples/glr/packing/README\n examples/glr/packing/Hugs.lhs\n examples/PgnParser.ly\n examples/MonadTest.ly\n examples/igloo/ParserM.hs\n examples/igloo/Makefile\n examples/igloo/Parser.y\n examples/igloo/Foo.hs\n examples/igloo/README\n examples/igloo/Lexer.x\n examples/README\n examples/Calc.ly\n examples/DavesExample.ly\n examples/ErrorTest.ly\n examples/ErlParser.ly\n examples/SimonsExample.ly\n examples/LexerTest.ly\n happy.spec\n src/ARRAY-NOTES\n tests/AttrGrammar001.y\n tests/AttrGrammar002.y\n tests/Makefile\n tests/Partial.ly\n tests/Test.ly\n tests/TestMulti.ly\n tests/TestPrecedence.ly\n tests/bogus-token.y\n tests/bug001.ly\n tests/bug002.y\n tests/error001.stderr\n tests/error001.stdout\n tests/error001.y\n tests/monad001.y\n tests/monad002.ly\n tests/monaderror.y\n tests/precedence001.ly\n tests/precedence002.y\n tests/test_rules.y\n tests/issue91.y\n tests/issue93.y\n tests/issue94.y\n tests/issue95.y\n tests/monaderror-explist.y\n tests/typeclass_monad001.y\n tests/typeclass_monad002.ly\n tests/typeclass_monad_lexer.y\n tests/rank2.y\n tests/shift01.y\n\nsource-repository head\n type: git\n location: https://github.com/simonmar/happy.git\n\nexecutable happy\n hs-source-dirs: src\n main-is: Main.lhs\n\n build-depends: base < 5,\n array,\n containers >= 0.4.2,\n mtl >= 2.2.1 && < 2.3\n -- mtl-2.2.1 added Control.Monad.Except\n\n default-language: Haskell98\n default-extensions: CPP, MagicHash, FlexibleContexts\n ghc-options: -Wall\n other-modules:\n Paths_happy\n AbsSyn\n First\n GenUtils\n Grammar\n Info\n LALR\n Lexer\n ParseMonad\n Parser\n ProduceCode\n ProduceGLRCode\n NameSet\n Target\n AttrGrammar\n AttrGrammarParser\n ParamRules\n PrettyGrammar\n\ntest-suite tests\n type: exitcode-stdio-1.0\n main-is: test.hs\n -- This line is important as it ensures that the local `exe:happy` component declared above is built before the test-suite component is invoked, as well as making sure that `happy` is made available on $PATH and `$happy_datadir` is set accordingly before invoking `test.hs`\n build-tools: happy\n\n build-depends: base, process\n default-language: Haskell98\n\n"; + } \ No newline at end of file diff --git a/materialized/happy-1.20.0/ghc967/cabal-files/mtl.nix b/materialized/happy-1.20.0/ghc967/cabal-files/mtl.nix new file mode 100644 index 0000000000..36fa049c2d --- /dev/null +++ b/materialized/happy-1.20.0/ghc967/cabal-files/mtl.nix @@ -0,0 +1,41 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "mtl"; version = "2.2.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Edward Kmett "; + author = "Andy Gill"; + homepage = "http://github.com/haskell/mtl"; + url = ""; + synopsis = "Monad classes, using functional dependencies"; + description = "Monad classes using functional dependencies, with instances\nfor various monad transformers, inspired by the paper\n/Functional Programming with Overloading and Higher-Order Polymorphism/,\nby Mark P Jones, in /Advanced School of Functional Programming/, 1995\n()."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/mtl-2.2.2.tar.gz"; + sha256 = "8803f48a8ed33296c3a3272f448198737a287ec31baa901af09e2118c829bef6"; + }); + }) // { + package-description-override = "name: mtl\nversion: 2.2.2\ncabal-version: >= 1.10\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Andy Gill\nmaintainer: Edward Kmett \ncategory: Control\nsynopsis: Monad classes, using functional dependencies\nhomepage: http://github.com/haskell/mtl\nbug-reports: http://github.com/haskell/mtl/issues\ndescription:\n Monad classes using functional dependencies, with instances\n for various monad transformers, inspired by the paper\n /Functional Programming with Overloading and Higher-Order Polymorphism/,\n by Mark P Jones, in /Advanced School of Functional Programming/, 1995\n ().\nbuild-type: Simple\nextra-source-files: CHANGELOG.markdown, README.markdown\ntested-with:\n GHC==7.0.4,\n GHC==7.2.2,\n GHC==7.4.2,\n GHC==7.6.3,\n GHC==7.8.4,\n GHC==7.10.3,\n GHC==8.0.2,\n GHC==8.2.2,\n GHC==8.4.1\n\nsource-repository head\n type: git\n location: https://github.com/haskell/mtl.git\n\nLibrary\n exposed-modules:\n Control.Monad.Cont\n Control.Monad.Cont.Class\n Control.Monad.Error\n Control.Monad.Error.Class\n Control.Monad.Except\n Control.Monad.Identity\n Control.Monad.List\n Control.Monad.RWS\n Control.Monad.RWS.Class\n Control.Monad.RWS.Lazy\n Control.Monad.RWS.Strict\n Control.Monad.Reader\n Control.Monad.Reader.Class\n Control.Monad.State\n Control.Monad.State.Class\n Control.Monad.State.Lazy\n Control.Monad.State.Strict\n Control.Monad.Trans\n Control.Monad.Writer\n Control.Monad.Writer.Class\n Control.Monad.Writer.Lazy\n Control.Monad.Writer.Strict\n build-depends: base < 5, transformers >= 0.4 && <0.6\n\n default-language: Haskell2010\n other-extensions:\n CPP\n MultiParamTypeClasses\n FunctionalDependencies\n FlexibleInstances\n UndecidableInstances\n\n -- This is a SafeHaskell safeguard (pun intended) to explicitly declare the API contract of `mtl`\n -- GHC versions before 7.4 were hopelessly broken or incapable of SafeHaskell\n if impl(ghc >= 7.4)\n default-extensions: Safe\n\n ghc-options: -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations\n\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances\n"; + } \ No newline at end of file diff --git a/materialized/happy-1.20.0/ghc967/cabal-files/transformers.nix b/materialized/happy-1.20.0/ghc967/cabal-files/transformers.nix new file mode 100644 index 0000000000..288d680c82 --- /dev/null +++ b/materialized/happy-1.20.0/ghc967/cabal-files/transformers.nix @@ -0,0 +1,40 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.6"; + identifier = { name = "transformers"; version = "0.5.6.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Ross Paterson "; + author = "Andy Gill, Ross Paterson"; + homepage = ""; + url = ""; + synopsis = "Concrete functor and monad transformers"; + description = "A portable library of functor and monad transformers, inspired by\nthe paper\n\n* \\\"Functional Programming with Overloading and Higher-Order\nPolymorphism\\\", by Mark P Jones,\nin /Advanced School of Functional Programming/, 1995\n().\n\nThis package contains:\n\n* the monad transformer class (in \"Control.Monad.Trans.Class\")\n\n* concrete functor and monad transformers, each with associated\noperations and functions to lift operations associated with other\ntransformers.\n\nThe package can be used on its own in portable Haskell code, in\nwhich case operations need to be manually lifted through transformer\nstacks (see \"Control.Monad.Trans.Class\" for some examples).\nAlternatively, it can be used with the non-portable monad classes in\nthe @mtl@ or @monads-tf@ packages, which automatically lift operations\nintroduced by monad transformers through other transformers."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + ] ++ pkgs.lib.optional (compiler.isGhc && (compiler.version.ge "7.2" && compiler.version.lt "7.5")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/transformers-0.5.6.2.tar.gz"; + sha256 = "b668795d600297e4c8a7fd55a107b9827b2c52c0bc14c5ea0d65e20e6691c66c"; + }); + }) // { + package-description-override = "name: transformers\nversion: 0.5.6.2\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Andy Gill, Ross Paterson\nmaintainer: Ross Paterson \nbug-reports: http://hub.darcs.net/ross/transformers/issues\ncategory: Control\nsynopsis: Concrete functor and monad transformers\ndescription:\n A portable library of functor and monad transformers, inspired by\n the paper\n .\n * \\\"Functional Programming with Overloading and Higher-Order\n Polymorphism\\\", by Mark P Jones,\n in /Advanced School of Functional Programming/, 1995\n ().\n .\n This package contains:\n .\n * the monad transformer class (in \"Control.Monad.Trans.Class\")\n .\n * concrete functor and monad transformers, each with associated\n operations and functions to lift operations associated with other\n transformers.\n .\n The package can be used on its own in portable Haskell code, in\n which case operations need to be manually lifted through transformer\n stacks (see \"Control.Monad.Trans.Class\" for some examples).\n Alternatively, it can be used with the non-portable monad classes in\n the @mtl@ or @monads-tf@ packages, which automatically lift operations\n introduced by monad transformers through other transformers.\nbuild-type: Simple\nextra-source-files:\n changelog\ncabal-version: >= 1.6\n\nsource-repository head\n type: darcs\n location: http://hub.darcs.net/ross/transformers\n\nlibrary\n build-depends: base >= 2 && < 6\n hs-source-dirs: .\n if !impl(ghc>=7.9)\n -- Data.Functor.Identity was moved into base-4.8.0.0 (GHC 7.10)\n -- see also https://ghc.haskell.org/trac/ghc/ticket/9664\n -- NB: using impl(ghc>=7.9) instead of fragile Cabal flags\n hs-source-dirs: legacy/pre709\n exposed-modules: Data.Functor.Identity\n if !impl(ghc>=7.11)\n -- modules moved into base-4.9.0 (GHC 8.0)\n -- see https://ghc.haskell.org/trac/ghc/ticket/10773\n -- see https://ghc.haskell.org/trac/ghc/ticket/11135\n hs-source-dirs: legacy/pre711\n exposed-modules:\n Control.Monad.IO.Class\n Data.Functor.Classes\n Data.Functor.Compose\n Data.Functor.Product\n Data.Functor.Sum\n if impl(ghc>=7.2 && <7.5)\n -- Prior to GHC 7.5, GHC.Generics lived in ghc-prim\n build-depends: ghc-prim\n exposed-modules:\n Control.Applicative.Backwards\n Control.Applicative.Lift\n Control.Monad.Signatures\n Control.Monad.Trans.Accum\n Control.Monad.Trans.Class\n Control.Monad.Trans.Cont\n Control.Monad.Trans.Except\n Control.Monad.Trans.Error\n Control.Monad.Trans.Identity\n Control.Monad.Trans.List\n Control.Monad.Trans.Maybe\n Control.Monad.Trans.Reader\n Control.Monad.Trans.RWS\n Control.Monad.Trans.RWS.CPS\n Control.Monad.Trans.RWS.Lazy\n Control.Monad.Trans.RWS.Strict\n Control.Monad.Trans.Select\n Control.Monad.Trans.State\n Control.Monad.Trans.State.Lazy\n Control.Monad.Trans.State.Strict\n Control.Monad.Trans.Writer\n Control.Monad.Trans.Writer.CPS\n Control.Monad.Trans.Writer.Lazy\n Control.Monad.Trans.Writer.Strict\n Data.Functor.Constant\n Data.Functor.Reverse\n"; + } \ No newline at end of file diff --git a/materialized/happy-1.20.0/ghc967/default.nix b/materialized/happy-1.20.0/ghc967/default.nix new file mode 100644 index 0000000000..9c6cffdd4f --- /dev/null +++ b/materialized/happy-1.20.0/ghc967/default.nix @@ -0,0 +1,70 @@ +{ + pkgs = hackage: + { + packages = { + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + transformers.revision = import ./cabal-files/transformers.nix; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + mtl.revision = import ./cabal-files/mtl.nix; + base.revision = hackage.base."4.18.3.0".revisions.default; + array.revision = hackage.array."0.5.8.0".revisions.default; + happy.revision = import ./cabal-files/happy.nix; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.7".revisions.default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + containers.revision = hackage.containers."0.6.7".revisions.default; + }; + compiler = { + version = "9.6.7"; + nix-name = "ghc967"; + packages = { + "ghc-boot-th" = "9.6.7"; + "pretty" = "1.1.3.6"; + "array" = "0.5.8.0"; + "ghc-prim" = "0.10.0"; + "template-haskell" = "2.20.0.0"; + "ghc-bignum" = "1.3"; + "deepseq" = "1.4.8.1"; + "containers" = "0.6.7"; + "base" = "4.18.3.0"; + }; + }; + }; + extras = hackage: + { packages = {}; }; + modules = [ + { + preExistingPkgs = [ + "ghc-bignum" + "deepseq" + "base" + "array" + "template-haskell" + "ghc-boot-th" + "ghc-prim" + "pretty" + "containers" + ]; + } + ({ lib, ... }: + { packages = {}; }) + ({ lib, ... }: + { + packages = { + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "happy".components.exes."happy".planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/happy-1.20.0/ghc967/plan.json b/materialized/happy-1.20.0/ghc967/plan.json new file mode 100644 index 0000000000..144853d115 --- /dev/null +++ b/materialized/happy-1.20.0/ghc967/plan.json @@ -0,0 +1 @@ +{"cabal-version":"3.14.2.0","cabal-lib-version":"3.14.2.0","compiler-id":"ghc-9.6.7","os":"osx","arch":"aarch64","install-plan":[{"type":"pre-existing","id":"array-0.5.8.0","pkg-name":"array","pkg-version":"0.5.8.0","depends":["base-4.18.3.0"]},{"type":"pre-existing","id":"base-4.18.3.0","pkg-name":"base","pkg-version":"4.18.3.0","depends":["ghc-prim-0.10.0","ghc-bignum-1.3"]},{"type":"pre-existing","id":"containers-0.6.7","pkg-name":"containers","pkg-version":"0.6.7","depends":["base-4.18.3.0","array-0.5.8.0","deepseq-1.4.8.1","template-haskell-2.20.0.0"]},{"type":"pre-existing","id":"deepseq-1.4.8.1","pkg-name":"deepseq","pkg-version":"1.4.8.1","depends":["base-4.18.3.0","array-0.5.8.0"]},{"type":"pre-existing","id":"ghc-bignum-1.3","pkg-name":"ghc-bignum","pkg-version":"1.3","depends":["ghc-prim-0.10.0"]},{"type":"pre-existing","id":"ghc-boot-th-9.6.7","pkg-name":"ghc-boot-th","pkg-version":"9.6.7","depends":["base-4.18.3.0"]},{"type":"pre-existing","id":"ghc-prim-0.10.0","pkg-name":"ghc-prim","pkg-version":"0.10.0","depends":[]},{"type":"configured","id":"hppy-1.20.0-22008d43","pkg-name":"happy","pkg-version":"1.20.0","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"5d47dc221a9fe964e36aaaa2e1ab7e8f085a225fd6528d6eff310b92360bbe99","pkg-src-sha256":"3b1d3a8f93a2723b554d9f07b2cd136be1a7b2fcab1855b12b7aab5cbac8868c","depends":["array-0.5.8.0","base-4.18.3.0","containers-0.6.7","mtl-2.2.2-7c0d25be"],"exe-depends":[],"component-name":"exe:happy","bin-file":"/store/ghc-9.6.7/hppy-1.20.0-22008d43/bin/happy"},{"type":"configured","id":"mtl-2.2.2-7c0d25be","pkg-name":"mtl","pkg-version":"2.2.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"1050fb71acd9f5d67da7d992583f5bd0eb14407b9dc7acc122af1b738b706ca3","pkg-src-sha256":"8803f48a8ed33296c3a3272f448198737a287ec31baa901af09e2118c829bef6","depends":["base-4.18.3.0","trnsfrmrs-0.5.6.2-842b1c0f"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"pretty-1.1.3.6","pkg-name":"pretty","pkg-version":"1.1.3.6","depends":["base-4.18.3.0","deepseq-1.4.8.1","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"template-haskell-2.20.0.0","pkg-name":"template-haskell","pkg-version":"2.20.0.0","depends":["base-4.18.3.0","ghc-boot-th-9.6.7","ghc-prim-0.10.0","pretty-1.1.3.6"]},{"type":"configured","id":"trnsfrmrs-0.5.6.2-842b1c0f","pkg-name":"transformers","pkg-version":"0.5.6.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"6c959d14430f4deffb99579ba019de07c3d852a2122b6f449344386c7d75ff1d","pkg-src-sha256":"b668795d600297e4c8a7fd55a107b9827b2c52c0bc14c5ea0d65e20e6691c66c","components":{"lib":{"depends":["base-4.18.3.0"],"exe-depends":[]}}}],"targets":[{"pkg-name":"array","pkg-version":"0.5.8.0","component-name":"lib","available":[{"id":"array-0.5.8.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"base","pkg-version":"4.18.3.0","component-name":"lib","available":[{"id":"base-4.18.3.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"containers","pkg-version":"0.6.7","component-name":"lib","available":[{"id":"containers-0.6.7","component-name":"lib","build-by-default":true}]},{"pkg-name":"deepseq","pkg-version":"1.4.8.1","component-name":"lib","available":[{"id":"deepseq-1.4.8.1","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-bignum","pkg-version":"1.3","component-name":"lib","available":[{"id":"ghc-bignum-1.3","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-boot-th","pkg-version":"9.6.7","component-name":"lib","available":[{"id":"ghc-boot-th-9.6.7","component-name":"lib","build-by-default":true}]},{"pkg-name":"ghc-prim","pkg-version":"0.10.0","component-name":"lib","available":[{"id":"ghc-prim-0.10.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"happy","pkg-version":"1.20.0","component-name":"exe:happy","available":[{"id":"hppy-1.20.0-22008d43","component-name":"exe:happy","build-by-default":true}]},{"pkg-name":"happy","pkg-version":"1.20.0","component-name":"test:tests","available":["TargetNotLocal"]},{"pkg-name":"mtl","pkg-version":"2.2.2","component-name":"lib","available":[{"id":"mtl-2.2.2-7c0d25be","component-name":"lib","build-by-default":true}]},{"pkg-name":"pretty","pkg-version":"1.1.3.6","component-name":"lib","available":[{"id":"pretty-1.1.3.6","component-name":"lib","build-by-default":true}]},{"pkg-name":"template-haskell","pkg-version":"2.20.0.0","component-name":"lib","available":[{"id":"template-haskell-2.20.0.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"transformers","pkg-version":"0.5.6.2","component-name":"lib","available":[{"id":"trnsfrmrs-0.5.6.2-842b1c0f","component-name":"lib","build-by-default":true}]}]} \ No newline at end of file diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 26f4f5fc4d..fe0fb14f2b 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1,7 +1,8 @@ final: prev: let buildBootstrapper.compilerNixName = - if final.buildPackages.haskell.compiler ? ghc964 then "ghc964" + if final.buildPackages.haskell.compiler ? ghc967 then "ghc967" + else if final.buildPackages.haskell.compiler ? ghc964 then "ghc964" else "ghc8107"; latestVerMap = { "8.10" = "8.10.7"; @@ -28,10 +29,10 @@ let (builtins.attrNames latestVerMap)); traceWarnOld = v: x: let - bootstrapGhc = final.buildPackages.haskell.compiler.ghc8107; + oldVersion = "9.6"; in - if builtins.compareVersions x.version bootstrapGhc.version < 0 then - throw "Desired GHC (${x.version}) is older than the bootstrap GHC (${bootstrapGhc.version}) for this platform (${final.stdenv.targetPlatform.config})." + if builtins.compareVersions x.version oldVersion < 0 then + throw "Desired GHC (${x.version}) is older than the oldest GHC haskell.nix might work with (GHC ${oldVersion})." else x // final.lib.optionalAttrs (x.version != latestVerMap.${v}) { latestVersion = latestVerMap.${v}; }; errorOldGhcjs = v: up: throw "ghcjs ${v} is no longer supported by haskell.nix. Consider using ${latestVerMap.${up}}"; in { @@ -50,7 +51,8 @@ in { }; # ghc 9.0.2 is no longer cached for nixpkgs-unstable and it seems to be broken nixpkgsBootCompiler = - if final.buildPackages.haskell.compiler ? ghc964 then "ghc964" + if final.buildPackages.haskell.compiler ? ghc967 then "ghc967" + else if final.buildPackages.haskell.compiler ? ghc964 then "ghc964" else "ghc902"; bootPkgsGhc94 = bootPkgs // { alex = final.buildPackages.haskell-nix.tool nixpkgsBootCompiler "alex" { From 085e4ec9a9c2cf95d2f1016fa390e4d955e1f83a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 15 Sep 2025 23:42:12 +1200 Subject: [PATCH 15/33] Fix for macOS --- lib/system-nixpkgs-map.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/system-nixpkgs-map.nix b/lib/system-nixpkgs-map.nix index 044db4ce5c..584f789bb9 100644 --- a/lib/system-nixpkgs-map.nix +++ b/lib/system-nixpkgs-map.nix @@ -386,6 +386,7 @@ in # In future versions of `nixpkgs` these will be removed # so make sure they are there. && darwin ? apple_sdk + && (builtins.tryEval (darwin.apple_sdk ? frameworks)).success && darwin.apple_sdk ? frameworks && darwin.apple_sdk.frameworks ? ${n} && !(darwin.apple_sdk.frameworks.${n}.passthru.isDarwinCompatStub or false) From 9f4610b4a6f5442b45a55be0f08c84a2ce951f41 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 16 Sep 2025 10:48:33 +1200 Subject: [PATCH 16/33] Fix for android tests --- ci.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci.nix b/ci.nix index e23afd2bfd..64fc669aa9 100644 --- a/ci.nix +++ b/ci.nix @@ -41,6 +41,8 @@ "dwarfdump-20181024" ]; allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "platform-tools" + "ndk" "android-sdk-ndk" "android-sdk-platform-tools" "aarch64-unknown-linux-android-ndk-toolchain-wrapper" From 7f896f5f5d782a7daff8ed29c206133035bde6bf Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 22 Sep 2025 17:34:09 +1200 Subject: [PATCH 17/33] Possible fix for wasm issue --- compiler/ghc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 3167e2123c..9bef9274b9 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -138,7 +138,7 @@ let }) targetPackages.buildPackages.llvmPackages.clang targetPackages.buildPackages.llvmPackages.llvm - targetPackages.buildPackages.binaryen + targetPackages.pkgsBuildBuild.binaryen ]; outputs = ["out" "dev"]; NIX_NO_SELF_RPATH = true; From 6e429c3c446de3d95de2690117bbba0f3c1d9bcf Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 23 Sep 2025 18:10:43 +1200 Subject: [PATCH 18/33] Update wasm to llvm 21 --- overlays/nix-prefetch-git-minimal.nix | 9 ++- .../patches/wasm/llvm/gnu-install-dirs.patch | 33 +++------- .../wasm/llvm/haskell-wasm-llvm-project.patch | 63 ++++++++++++------- overlays/wasm.nix | 6 +- 4 files changed, 60 insertions(+), 51 deletions(-) diff --git a/overlays/nix-prefetch-git-minimal.nix b/overlays/nix-prefetch-git-minimal.nix index 8d599e4de0..b043f9b8b1 100644 --- a/overlays/nix-prefetch-git-minimal.nix +++ b/overlays/nix-prefetch-git-minimal.nix @@ -17,9 +17,12 @@ final: prev: { # This can reduce closure size of nix-tools: # * Eliminates dependency on python3 (70MB) # * Allows sharing with `fetchgit` as it also uses `gitMinimal` (50MB) - inherit (final.callPackages (final.path + "/pkgs/tools/package-management/nix-prefetch-scripts") { - git = final.gitMinimal; - }) nix-prefetch-git; + inherit ( + let f = import (final.path + "/pkgs/tools/package-management/nix-prefetch-scripts"); + in + if (builtins.functionArgs f) ? git + then final.callPackages f { git = final.gitMinimal; } + else prev) nix-prefetch-git; # fetchgit use `buildPackages.gitMinimal` and on nixpkgs 21.11 # and earlier that causes problems when cross compiling. diff --git a/overlays/patches/wasm/llvm/gnu-install-dirs.patch b/overlays/patches/wasm/llvm/gnu-install-dirs.patch index 482325452c..30c660210b 100644 --- a/overlays/patches/wasm/llvm/gnu-install-dirs.patch +++ b/overlays/patches/wasm/llvm/gnu-install-dirs.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index c9ff3696e22d..bd96aab5e237 100644 +index 73c4fc14f031..42284703a52c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1133,9 +1133,9 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") +@@ -1153,9 +1153,9 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime) install(TARGETS tf_xla_runtime EXPORT LLVMExports @@ -15,7 +15,7 @@ index c9ff3696e22d..bd96aab5e237 100644 # Once we add more modules, we should handle this more automatically. if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake -index baf47677b247..81954240a9bf 100644 +index 52bf7ca0906a..ba2f4be17f08 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -974,8 +974,8 @@ macro(add_llvm_library name) @@ -29,17 +29,17 @@ index baf47677b247..81954240a9bf 100644 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) if (NOT LLVM_ENABLE_IDE) -@@ -2240,7 +2240,7 @@ function(llvm_install_library_symlink name dest type) +@@ -2258,7 +2258,7 @@ function(llvm_install_library_symlink name dest type) set(LLVM_LINK_OR_COPY copy) endif() - set(output_dir lib${LLVM_LIBDIR_SUFFIX}) + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) - if(WIN32 AND "${type}" STREQUAL "SHARED") + if((WIN32 OR CYGWIN) AND "${type}" STREQUAL "SHARED") set(output_dir "${CMAKE_INSTALL_BINDIR}") endif() -@@ -2516,15 +2516,37 @@ function(llvm_setup_rpath name) - +@@ -2534,15 +2534,37 @@ function(llvm_setup_rpath name) + if (APPLE) set(_install_name_dir INSTALL_NAME_DIR "@rpath") - set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) @@ -79,19 +79,6 @@ index baf47677b247..81954240a9bf 100644 if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-z,origin ") -@@ -2539,9 +2561,9 @@ function(llvm_setup_rpath name) - endif() - - # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set. -- if("${CMAKE_BUILD_RPATH}" STREQUAL "") -- set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON) -- endif() -+ #if("${CMAKE_BUILD_RPATH}" STREQUAL "") -+ # set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON) -+ #endif() - - set_target_properties(${name} PROPERTIES - INSTALL_RPATH "${_install_rpath}" diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake index 2d9116b08a52..2dd7cad4ec66 100644 --- a/cmake/modules/AddOCaml.cmake @@ -122,7 +109,7 @@ index ef4cfa3acdb5..7478e157a7c2 100644 "${LLVM_CONFIG_LIBRARY_DIR}" # FIXME: Should there be other entries here? diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in -index 370005cd8d7d..7e790bc52111 100644 +index e4e1d449bf4d..3aab6ea7bf8b 100644 --- a/tools/llvm-config/BuildVariables.inc.in +++ b/tools/llvm-config/BuildVariables.inc.in @@ -23,6 +23,7 @@ @@ -134,10 +121,10 @@ index 370005cd8d7d..7e790bc52111 100644 #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@" #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp -index d5b76b1bb6c1..1dbdb2a8f10d 100644 +index 49df8fdcb7f7..c7cb05b82821 100644 --- a/tools/llvm-config/llvm-config.cpp +++ b/tools/llvm-config/llvm-config.cpp -@@ -366,7 +366,11 @@ int main(int argc, char **argv) { +@@ -365,7 +365,11 @@ int main(int argc, char **argv) { sys::fs::make_absolute(ActivePrefix, Path); ActiveBinDir = std::string(Path); } diff --git a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch index d45b5d0880..c03379b9cb 100644 --- a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch +++ b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch @@ -1,5 +1,5 @@ diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp b/clang/lib/Driver/ToolChains/WebAssembly.cpp -index bd25fd1a8933..b906bff5d5c7 100644 +index 5054868b5ff4..e4fcd949ff71 100644 --- a/clang/lib/Driver/ToolChains/WebAssembly.cpp +++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -6,6 +6,8 @@ @@ -9,9 +9,9 @@ index bd25fd1a8933..b906bff5d5c7 100644 +#include + #include "WebAssembly.h" - #include "CommonArgs.h" #include "Gnu.h" -@@ -19,6 +21,7 @@ + #include "clang/Config/config.h" +@@ -17,6 +19,7 @@ #include "llvm/Option/ArgList.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" @@ -19,7 +19,7 @@ index bd25fd1a8933..b906bff5d5c7 100644 #include "llvm/Support/VirtualFileSystem.h" using namespace clang::driver; -@@ -168,21 +171,12 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -179,21 +182,12 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); @@ -44,7 +44,7 @@ index bd25fd1a8933..b906bff5d5c7 100644 } if (!WasmOptPath.empty()) { -@@ -193,29 +187,27 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -204,29 +198,27 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA, ResponseFileSupport::AtFileCurCP(), Linker, CmdArgs, Inputs, Output)); @@ -95,10 +95,10 @@ index bd25fd1a8933..b906bff5d5c7 100644 } diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake -index c3e734f72392..282a321fd70b 100644 +index fb2aee8e42ee..a5de2dca1bc9 100644 --- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake +++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake -@@ -382,8 +382,8 @@ function(add_compiler_rt_runtime name type) +@@ -390,8 +390,8 @@ function(add_compiler_rt_runtime name type) target_link_libraries(${libname} PRIVATE ${builtins_${libname}}) endif() if(${type} STREQUAL "SHARED") @@ -110,10 +110,10 @@ index c3e734f72392..282a321fd70b 100644 if(WIN32 AND NOT CYGWIN AND NOT MINGW) set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp -index 0e6c4e691be1..bfa438505d98 100644 +index 181221a77b10..c813e62e7b93 100644 --- a/lld/wasm/InputChunks.cpp +++ b/lld/wasm/InputChunks.cpp -@@ -361,12 +361,11 @@ uint64_t InputChunk::getVA(uint64_t offset) const { +@@ -409,12 +409,11 @@ uint64_t InputChunk::getVA(uint64_t offset) const { // Generate code to apply relocations to the data section at runtime. // This is only called when generating shared libraries (PIC) where address are // not known at static link time. @@ -127,7 +127,7 @@ index 0e6c4e691be1..bfa438505d98 100644 unsigned opcode_ptr_const = is64 ? WASM_OPCODE_I64_CONST : WASM_OPCODE_I32_CONST; unsigned opcode_ptr_add = is64 ? WASM_OPCODE_I64_ADD -@@ -385,6 +384,14 @@ bool InputChunk::generateRelocationCode(raw_ostream &os) const { +@@ -433,6 +432,14 @@ bool InputChunk::generateRelocationCode(raw_ostream &os) const { if (!requiresRuntimeReloc) continue; @@ -142,7 +142,7 @@ index 0e6c4e691be1..bfa438505d98 100644 LLVM_DEBUG(dbgs() << "gen reloc: type=" << relocTypeToString(rel.Type) << " addend=" << rel.Addend << " index=" << rel.Index << " output offset=" << offset << "\n"); -@@ -439,9 +446,7 @@ bool InputChunk::generateRelocationCode(raw_ostream &os) const { +@@ -487,9 +494,7 @@ bool InputChunk::generateRelocationCode(raw_ostream &os) const { writeU8(os, opcode_reloc_store, "I32_STORE"); writeUleb128(os, 2, "align"); writeUleb128(os, 0, "offset"); @@ -153,12 +153,12 @@ index 0e6c4e691be1..bfa438505d98 100644 // Split WASM_SEG_FLAG_STRINGS section. Such a section is a sequence of diff --git a/lld/wasm/InputChunks.h b/lld/wasm/InputChunks.h -index f545449e1246..d231382a5f5e 100644 +index 1fe78d76631f..2c721f5f92e8 100644 --- a/lld/wasm/InputChunks.h +++ b/lld/wasm/InputChunks.h -@@ -78,7 +78,7 @@ public: - +@@ -79,7 +79,7 @@ public: size_t getNumRelocations() const { return relocations.size(); } + size_t getNumLiveRelocations() const; void writeRelocations(llvm::raw_ostream &os) const; - bool generateRelocationCode(raw_ostream &os) const; + void generateRelocationCode(std::vector &funcs) const; @@ -166,10 +166,10 @@ index f545449e1246..d231382a5f5e 100644 bool isTLS() const { return flags & llvm::wasm::WASM_SEG_FLAG_TLS; } bool isRetained() const { return flags & llvm::wasm::WASM_SEG_FLAG_RETAIN; } diff --git a/lld/wasm/SyntheticSections.cpp b/lld/wasm/SyntheticSections.cpp -index 0e2aa57e9048..e5df7d8c0be0 100644 +index e1192706ea91..1b97039b1f1f 100644 --- a/lld/wasm/SyntheticSections.cpp +++ b/lld/wasm/SyntheticSections.cpp -@@ -299,6 +299,8 @@ void FunctionSection::writeBody() { +@@ -312,6 +312,8 @@ void FunctionSection::writeBody() { void FunctionSection::addFunction(InputFunction *func) { if (!func->live) return; @@ -179,10 +179,10 @@ index 0e2aa57e9048..e5df7d8c0be0 100644 out.importSec->getNumImportedFunctions() + inputFunctions.size(); inputFunctions.emplace_back(func); diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp -index 2bf4b370a7db..19fca2616c7a 100644 +index b704677d36c9..ac9eab2b9dd5 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp -@@ -1452,20 +1452,21 @@ void Writer::createStartFunction() { +@@ -1455,20 +1455,21 @@ void Writer::createStartFunction() { void Writer::createApplyDataRelocationsFunction() { LLVM_DEBUG(dbgs() << "createApplyDataRelocationsFunction\n"); // First write the body's contents to a string. @@ -213,7 +213,7 @@ index 2bf4b370a7db..19fca2616c7a 100644 writeU8(os, WASM_OPCODE_END, "END"); } -@@ -1478,24 +1479,67 @@ void Writer::createApplyDataRelocationsFunction() { +@@ -1481,24 +1482,67 @@ void Writer::createApplyDataRelocationsFunction() { make(nullSignature, "__wasm_apply_data_relocs")); def->markLive(); @@ -288,10 +288,10 @@ index 2bf4b370a7db..19fca2616c7a 100644 // Similar to createApplyDataRelocationsFunction but generates relocation code diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index d3e9377c8d2f..50a34184919a 100644 +index 83772ed8d2b1..0a7360d9357a 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -2524,8 +2524,7 @@ function(llvm_setup_rpath name) +@@ -2547,8 +2547,7 @@ function(llvm_setup_rpath name) # FIXME: update this when there is better solution. set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) elseif(UNIX) @@ -301,7 +301,7 @@ index d3e9377c8d2f..50a34184919a 100644 if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-z,origin ") -@@ -2539,16 +2538,9 @@ function(llvm_setup_rpath name) +@@ -2562,16 +2561,9 @@ function(llvm_setup_rpath name) return() endif() @@ -320,3 +320,22 @@ index d3e9377c8d2f..50a34184919a 100644 endif() set_target_properties(${name} PROPERTIES +diff --git a/llvm/lib/MC/MCParser/WasmAsmParser.cpp b/llvm/lib/MC/MCParser/WasmAsmParser.cpp +index 1f824b80bcd4..1025d3ee3026 100644 +--- a/llvm/lib/MC/MCParser/WasmAsmParser.cpp ++++ b/llvm/lib/MC/MCParser/WasmAsmParser.cpp +@@ -228,7 +228,13 @@ public: + if (WasmSym->isFunction()) { + // Ignore .size directives for function symbols. They get their size + // set automatically based on their content. +- Warning(Loc, ".size directive ignored for function symbols"); ++ // ++ // Upstream LLVM treats this as a warning, we turn this into an ++ // error since it almost certainly signals severely malformed ++ // assembly due to miscompilation, and data/function symbol kind ++ // confusion is not always caught at link-time and might ++ // manifest as wasm runtime crashes :/ ++ Error(Loc, ".size directive ignored for function symbols"); + } else { + getStreamer().emitELFSize(Sym, Expr); + } diff --git a/overlays/wasm.nix b/overlays/wasm.nix index 1550af07d7..2f8d55e43a 100644 --- a/overlays/wasm.nix +++ b/overlays/wasm.nix @@ -1,11 +1,11 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.targetPlatform.isWasm { - llvmPackages = final.llvmPackages_20.override { + llvmPackages = final.llvmPackages_21.override { patchesFn = p: p // { "llvm/gnu-install-dirs.patch" = [{path = ./patches/wasm;}]; }; monorepoSrc = final.stdenv.mkDerivation { pname = "llvm-source"; - version = final.llvmPackages_20.llvm.version + "-haskell"; - src = final.llvmPackages_20.llvm.monorepoSrc; + version = final.llvmPackages_21.llvm.version + "-haskell"; + src = final.llvmPackages_21.llvm.monorepoSrc; patches = ./patches/wasm/llvm/haskell-wasm-llvm-project.patch; buildPhase = "true"; installPhase = '' From c35b07f5e71f5863a76d952896384d21c7e479c0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 23 Sep 2025 23:01:42 +1200 Subject: [PATCH 19/33] Ignore test broken by upgrading warning to error --- .../patches/wasm/llvm/haskell-wasm-llvm-project.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch index c03379b9cb..0d69b6691c 100644 --- a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch +++ b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch @@ -339,3 +339,13 @@ index 1f824b80bcd4..1025d3ee3026 100644 } else { getStreamer().emitELFSize(Sym, Expr); } +diff --git a/llvm/test/MC/WebAssembly/null-output.s b/llvm/test/MC/WebAssembly/null-output.s +index fb15eecffc86..513e37d35039 100644 +--- a/llvm/test/MC/WebAssembly/null-output.s ++++ b/llvm/test/MC/WebAssembly/null-output.s +@@ -1,4 +1,5 @@ + # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj -o /dev/null < %s ++# XFAIL: * + + .text + .section .text.main,"",@ From 90f3cbe2e2800b0b0a1112e08b694f5b94ab671c Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 24 Sep 2025 00:15:46 +1200 Subject: [PATCH 20/33] Expect error not warning for llvm test --- .../patches/wasm/llvm/haskell-wasm-llvm-project.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch index 0d69b6691c..2e312cb4e3 100644 --- a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch +++ b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch @@ -339,6 +339,16 @@ index 1f824b80bcd4..1025d3ee3026 100644 } else { getStreamer().emitELFSize(Sym, Expr); } +diff --git a/llvm/test/MC/WebAssembly/function-size-warning.s b/llvm/test/MC/WebAssembly/function-size-warning.s +index 627002dd3578..fd410d9ae67c 100644 +--- a/llvm/test/MC/WebAssembly/function-size-warning.s ++++ b/llvm/test/MC/WebAssembly/function-size-warning.s +@@ -12,4 +12,4 @@ foo: + # assembly files. + .size foo, 0 + +-# CHECK: warning: .size directive ignored for function symbols ++# CHECK-ERROR: error: .size directive ignored for function symbols diff --git a/llvm/test/MC/WebAssembly/null-output.s b/llvm/test/MC/WebAssembly/null-output.s index fb15eecffc86..513e37d35039 100644 --- a/llvm/test/MC/WebAssembly/null-output.s From 23ed82d78af685077f0faa7eb99286b6bd5d088c Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 24 Sep 2025 01:49:29 +1200 Subject: [PATCH 21/33] Expect error not warning for llvm test --- .../wasm/llvm/haskell-wasm-llvm-project.patch | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch index 2e312cb4e3..aebb80cb6e 100644 --- a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch +++ b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch @@ -340,15 +340,22 @@ index 1f824b80bcd4..1025d3ee3026 100644 getStreamer().emitELFSize(Sym, Expr); } diff --git a/llvm/test/MC/WebAssembly/function-size-warning.s b/llvm/test/MC/WebAssembly/function-size-warning.s -index 627002dd3578..fd410d9ae67c 100644 +index 627002dd3578..95e9294f80f7 100644 --- a/llvm/test/MC/WebAssembly/function-size-warning.s +++ b/llvm/test/MC/WebAssembly/function-size-warning.s -@@ -12,4 +12,4 @@ foo: +@@ -1,5 +1,4 @@ +-# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o 2>&1 | FileCheck %s +-# RUN: llvm-objdump -t %t.o ++# RUN: not llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o 2>&1 | FileCheck %s + + foo: + .functype foo () -> () +@@ -12,4 +11,4 @@ foo: # assembly files. .size foo, 0 -# CHECK: warning: .size directive ignored for function symbols -+# CHECK-ERROR: error: .size directive ignored for function symbols ++# CHECK: error: .size directive ignored for function symbols diff --git a/llvm/test/MC/WebAssembly/null-output.s b/llvm/test/MC/WebAssembly/null-output.s index fb15eecffc86..513e37d35039 100644 --- a/llvm/test/MC/WebAssembly/null-output.s From f414232ab980cb0827305fffe3b7e90ccd308ce7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 24 Sep 2025 11:53:42 +1200 Subject: [PATCH 22/33] Bump nixpkgs --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index b089178499..195aa24b6b 100644 --- a/flake.lock +++ b/flake.lock @@ -484,11 +484,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1757843276, - "narHash": "sha256-GNqrHTSABo9Fwvhcgq4hy4Us5OY368gIEJCI48lBWhM=", + "lastModified": 1758446476, + "narHash": "sha256-5rdAi7CTvM/kSs6fHe1bREIva5W3TbImsto+dxG4mBo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "af745796c2755d6f3a6d835967862184d53a17ff", + "rev": "a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0", "type": "github" }, "original": { From ae9b6cf4adb718196e1d59338ea61a77ed1a6b1e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 25 Sep 2025 20:34:43 +1200 Subject: [PATCH 23/33] Use latest llvm --- overlays/bootstrap.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index fe0fb14f2b..7867a91104 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1082,8 +1082,8 @@ in { }; inherit sphinx; - buildLlvmPackages = final.buildPackages.llvmPackages_15; - llvmPackages = final.llvmPackages_15; + buildLlvmPackages = final.buildPackages.llvmPackages_21; + llvmPackages = final.llvmPackages_21; src-spec.file = final.haskell-nix.sources.ghc9122; src-spec.version = "9.12.2"; @@ -1123,8 +1123,8 @@ in { }; inherit sphinx; - buildLlvmPackages = final.buildPackages.llvmPackages_15; - llvmPackages = final.llvmPackages_15; + buildLlvmPackages = final.buildPackages.llvmPackages_21; + llvmPackages = final.llvmPackages_21; src-spec.file = src; src-spec.version = version; From b8703595062adc2d6e43d9254590401eb3e7bfd1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 25 Sep 2025 23:19:18 +1200 Subject: [PATCH 24/33] Use llvm <21 for now --- overlays/bootstrap.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 7867a91104..fca39ea6a6 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1082,8 +1082,8 @@ in { }; inherit sphinx; - buildLlvmPackages = final.buildPackages.llvmPackages_21; - llvmPackages = final.llvmPackages_21; + buildLlvmPackages = final.buildPackages.llvmPackages_20; + llvmPackages = final.llvmPackages_20; src-spec.file = final.haskell-nix.sources.ghc9122; src-spec.version = "9.12.2"; @@ -1123,8 +1123,8 @@ in { }; inherit sphinx; - buildLlvmPackages = final.buildPackages.llvmPackages_21; - llvmPackages = final.llvmPackages_21; + buildLlvmPackages = final.buildPackages.llvmPackages_20; + llvmPackages = final.llvmPackages_20; src-spec.file = src; src-spec.version = version; From 1d79db044e94db123e10a08577d8a3c0933f18bf Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 25 Sep 2025 23:27:20 +1200 Subject: [PATCH 25/33] Use nixpkgs 25.05 for older llvm versions --- ci.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.nix b/ci.nix index 64fc669aa9..ad1e0baaac 100644 --- a/ci.nix +++ b/ci.nix @@ -67,14 +67,14 @@ nixpkgs.lib.optionalAttrs (builtins.elem nixpkgsName ["R2411" "R2505"]) { ghc96 = false; ghc98 = false; + ghc98llvm = false; ghc910 = false; + ghc910llvm = false; ghc912 = false; } // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") { ghc96 = true; ghc98 = true; - ghc98llvm = false; ghc910 = true; - ghc910llvm = false; ghc912 = true; ghc912llvm = true; ghc913 = true; From a01cff7d2f46a22704853196066eb9c4ac817ecf Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 26 Sep 2025 00:02:44 +1200 Subject: [PATCH 26/33] Use pkgsBuildBuild.nodejs (not buildPackages.nodejs) --- builder/comp-builder.nix | 2 +- compiler/ghc/default.nix | 33 +++++++++++++++++---------------- lib/check.nix | 6 +++--- lib/default.nix | 2 +- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index ef67241ba4..819cfea2ab 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -499,7 +499,7 @@ let nativeBuildInputs = [ghc buildPackages.removeReferencesTo] ++ executableToolDepends - ++ (lib.optional stdenv.hostPlatform.isGhcjs buildPackages.nodejs) + ++ (lib.optional stdenv.hostPlatform.isGhcjs pkgsBuildBuild.nodejs) ++ (lib.optional (ghc.useLdLld or false) llvmPackages.bintools); outputs = ["out"] diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 9bef9274b9..94b62dc9fb 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -9,6 +9,7 @@ let self = # build-tools , bootPkgs , buildPackages +, pkgsBuildBuild , autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx, numactl, elfutils, libcxx, libcxxabi ? throw "No libcxxabi" , autoreconfHook , bash @@ -95,7 +96,7 @@ let self = # # We use this instead of `buildPackages` so that plan evaluation # can work on platforms other than the `buildPlatform`. -, ghcEvalPackages ? buildPackages +, ghcEvalPackages ? pkgsBuildBuild }@args: assert !(enableIntegerSimple || enableNativeBignum) -> gmp != null; @@ -128,23 +129,23 @@ let INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"} ''; - nodejs = buildPackages.nodejs_24; + nodejs = pkgsBuildBuild.nodejs_24; - libffi-wasm = buildPackages.runCommand "libffi-wasm" { + libffi-wasm = pkgsBuildBuild.runCommand "libffi-wasm" { nativeBuildInputs = [ - (buildPackages.haskell-nix.tool "ghc912" "libffi-wasm" { - src = buildPackages.haskell-nix.sources.libffi-wasm; + (pkgsBuildBuild.haskell-nix.tool "ghc912" "libffi-wasm" { + src = pkgsBuildBuild.haskell-nix.sources.libffi-wasm; evalPackages = ghcEvalPackages; }) targetPackages.buildPackages.llvmPackages.clang targetPackages.buildPackages.llvmPackages.llvm - targetPackages.pkgsBuildBuild.binaryen + pkgsBuildBuild.binaryen ]; outputs = ["out" "dev"]; NIX_NO_SELF_RPATH = true; } '' mkdir cbits - cp ${buildPackages.haskell-nix.sources.libffi-wasm}/cbits/* cbits/ + cp ${pkgsBuildBuild.haskell-nix.sources.libffi-wasm}/cbits/* cbits/ libffi-wasm wasm32-unknown-wasi-clang -Wall -Wextra -mcpu=mvp -Oz -DNDEBUG -Icbits -c cbits/ffi.c -o cbits/ffi.o wasm32-unknown-wasi-clang -Wall -Wextra -mcpu=mvp -Oz -DNDEBUG -Icbits -c cbits/ffi_call.c -o cbits/ffi_call.o @@ -159,7 +160,7 @@ let wasm-opt --low-memory-unused --converge --debuginfo --flatten --rereloop --gufa -O4 -Oz libffi.so -o $out/lib/libffi.so ''; - lib-wasm = buildPackages.symlinkJoin { + lib-wasm = pkgsBuildBuild.symlinkJoin { name = "lib-wasm"; paths = [ targetPackages.wasilibc libffi-wasm ]; }; @@ -315,15 +316,15 @@ let compiler-nix-name = if builtins.compareVersions ghc-version "9.4.7" < 0 then "ghc928" - else if buildPackages.haskell.compiler ? ghc967 + else if pkgsBuildBuild.haskell.compiler ? ghc967 then "ghc967" - else if buildPackages.haskell.compiler ? ghc966 + else if pkgsBuildBuild.haskell.compiler ? ghc966 then "ghc966" - else if buildPackages.haskell.compiler ? ghc964 + else if pkgsBuildBuild.haskell.compiler ? ghc964 then "ghc964" else "ghc962"; in - buildPackages.haskell-nix.cabalProject' ({ + pkgsBuildBuild.haskell-nix.cabalProject' ({ inherit compiler-nix-name; name = "hadrian"; compilerSelection = p: p.haskell.compiler; @@ -345,8 +346,8 @@ let cabalProjectFreeze = null; src = haskell-nix.haskellLib.cleanSourceWith { src = { - outPath = buildPackages.srcOnly { - stdenv = buildPackages.stdenvNoCC; + outPath = pkgsBuildBuild.srcOnly { + stdenv = pkgsBuildBuild.stdenvNoCC; name = "hadrian"; inherit src; }; @@ -356,7 +357,7 @@ let includeSiblings = true; }; # When building the plan we do not need a patched version - # of the source and `buildPackages.srcOnly` requires introduces + # of the source and `pkgsBuildBuild.srcOnly` requires introduces # a dependency on a build machine. evalSrc = haskell-nix.haskellLib.cleanSourceWith { src = { @@ -617,7 +618,7 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { if builtins.compareVersions ghc-version "9.13" < 0 then "--experimental-wasm-type-reflection" else "--max-old-space-size=65536"} --no-turbo-fast-api-calls --wasm-lazy-validation" \ - "${buildPackages.writeShellScriptBin "node" '' + "${pkgsBuildBuild.writeShellScriptBin "node" '' SCRIPT=$1 shift LIB_WASM=$1 diff --git a/lib/check.nix b/lib/check.nix index bbce149fe7..fd6508e3df 100644 --- a/lib/check.nix +++ b/lib/check.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, haskellLib, buildPackages }: +{ stdenv, lib, haskellLib, pkgsBuildBuild }: let self = drvOrig: let @@ -39,8 +39,8 @@ in stdenv.mkDerivation (( meta = builtins.removeAttrs drv.meta ["mainProgram"]; nativeBuildInputs = drv.nativeBuildInputs - ++ [buildPackages.xorg.lndir] - ++ lib.optional (stdenv.hostPlatform.isGhcjs) buildPackages.nodejs; + ++ [pkgsBuildBuild.xorg.lndir] + ++ lib.optional (stdenv.hostPlatform.isGhcjs) pkgsBuildBuild.nodejs; inherit (component) doCheck doCrossCheck; diff --git a/lib/default.nix b/lib/default.nix index bca69dd656..f9d7269701 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -241,7 +241,7 @@ in { # Check a test component check = import ./check.nix { inherit stdenv lib haskellLib; - inherit (pkgs) buildPackages; + inherit (pkgs) pkgsBuildBuild; }; # Do coverage of a package From cb1f6f3a1f3723611919316e501e4a5ba3cfb00b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 26 Sep 2025 10:43:50 +1200 Subject: [PATCH 27/33] Use llvm <20 for now --- overlays/bootstrap.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index fca39ea6a6..4acef47147 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1082,8 +1082,8 @@ in { }; inherit sphinx; - buildLlvmPackages = final.buildPackages.llvmPackages_20; - llvmPackages = final.llvmPackages_20; + buildLlvmPackages = final.buildPackages.llvmPackages_19; + llvmPackages = final.llvmPackages_19; src-spec.file = final.haskell-nix.sources.ghc9122; src-spec.version = "9.12.2"; @@ -1123,8 +1123,8 @@ in { }; inherit sphinx; - buildLlvmPackages = final.buildPackages.llvmPackages_20; - llvmPackages = final.llvmPackages_20; + buildLlvmPackages = final.buildPackages.llvmPackages_19; + llvmPackages = final.llvmPackages_19; src-spec.file = src; src-spec.version = version; From eaa6894029a3c68694a04ce5d4932d5106c10c5b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 29 Sep 2025 20:15:43 +1300 Subject: [PATCH 28/33] nix flake update nixpkgs-unstable --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index be93d6ef44..d0f3303eb9 100644 --- a/flake.lock +++ b/flake.lock @@ -484,11 +484,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1758446476, - "narHash": "sha256-5rdAi7CTvM/kSs6fHe1bREIva5W3TbImsto+dxG4mBo=", + "lastModified": 1759070547, + "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0", + "rev": "647e5c14cbd5067f44ac86b74f014962df460840", "type": "github" }, "original": { From e208bf3a52564ca6e170846f5bbc92ef1c3fba00 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 1 Oct 2025 12:26:41 +1300 Subject: [PATCH 29/33] Disable broken tests --- ci.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci.nix b/ci.nix index ad1e0baaac..88d01c087c 100644 --- a/ci.nix +++ b/ci.nix @@ -93,7 +93,8 @@ inherit (lib.systems.examples) ghcjs; } // lib.optionalAttrs (nixpkgsName == "unstable" && (__match ".*llvm" compiler-nix-name == null) - && !builtins.elem compiler-nix-name ["ghc967" "ghc984" "ghc9102"]) { + && !builtins.elem compiler-nix-name ["ghc967" "ghc984" "ghc9102"] + && system != "x86_64-darwin") { inherit (lib.systems.examples) wasi32; } // lib.optionalAttrs (nixpkgsName == "unstable" && (__match ".*llvm" compiler-nix-name == null) @@ -114,7 +115,7 @@ inherit (lib.systems.examples) musl32; } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { inherit (lib.systems.examples) aarch64-android-prebuilt; - } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) { + } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName != "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) { inherit (lib.systems.examples) armv7a-android-prebuilt; } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) { # TODO fix this for the compilers we build with hadrian (ghc >=9.4) From 72585afb846066d152c920588a1e29d470203634 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 8 Oct 2025 00:21:42 +1300 Subject: [PATCH 30/33] Use $out/build for GHC builds --- compiler/ghc/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 9fd9a5f1f4..0f52b69aa2 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -856,11 +856,6 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { for a in libraries/*/*.cabal.in utils/*/*.cabal.in compiler/ghc.cabal.in; do ${hadrian}/bin/hadrian ${hadrianArgs} "''${a%.*}" done - '' + lib.optionalString (ghc-version == "9.8.20230704") '' - for a in bytearray-access-ops.txt.pp addr-access-ops.txt.pp primops.txt; do - ${hadrian}/bin/hadrian ${hadrianArgs} _build/stage0/compiler/build/$a - cp _build/stage0/compiler/build/$a compiler/GHC/Builtin/$a - done '' + lib.optionalString (stdenv.isDarwin && (__tryEval libcxxabi).success) '' substituteInPlace mk/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib' @@ -953,6 +948,10 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { export XATTR=$(mktemp -d)/nothing ''; } // lib.optionalAttrs useHadrian { + preUnpack = '' + mkdir -p $out/build + cd $out/build + ''; postConfigure = lib.optionalString (stdenv.isDarwin && (__tryEval libcxxabi).success) '' substituteInPlace mk/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib' @@ -995,7 +994,6 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { installPhase = if installStage1 then '' - mkdir $out cp -r _build/stage1/bin $out # let's assume that if we find a non-prefixed genprimop, # we also find a non-prefixed deriveConstants @@ -1012,6 +1010,8 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { mkdir $doc cp -r _build/stage1/share $doc runHook postInstall + cd $out + rm -rf $out/build '' # there appears to be a bug in GHCs configure script not properly passing dllwrap, and windres to the # generated settings file. Hence we patch it back in here. @@ -1042,6 +1042,8 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { make install cd ../../.. runHook postInstall + cd $out + rm -rf $out/build ''; })); in self From 3ea28b1efa56d99ee3241e53b688c864d6a6b4a1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 10 Oct 2025 13:36:49 +1300 Subject: [PATCH 31/33] Disable broken tests --- test/annotations/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/annotations/default.nix b/test/annotations/default.nix index 37fc6ed8d9..6412b44e43 100644 --- a/test/annotations/default.nix +++ b/test/annotations/default.nix @@ -15,7 +15,11 @@ in recurseIntoAttrs { # Failed to lookup symbol: __aarch64_swp8_acq_rel || (builtins.elem compiler-nix-name ["ghc947" "ghc948"] && haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) # unhandled ELF relocation(Rel) type 10 - || (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32); + || (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) + # Disable for now (CI machines currently timing out) + || stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isAndroid + || (stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64) + ; ifdInputs = { inherit (project) plan-nix; }; From bd4850369d1e3b481269be20aefe5425bdc4c81f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 13 Oct 2025 22:02:37 +1300 Subject: [PATCH 32/33] Fix warning --- lib/pkgconf-nixpkgs-map.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkgconf-nixpkgs-map.nix b/lib/pkgconf-nixpkgs-map.nix index ea272f08ac..8873555ac3 100644 --- a/lib/pkgconf-nixpkgs-map.nix +++ b/lib/pkgconf-nixpkgs-map.nix @@ -3150,7 +3150,7 @@ pkgs: "libsixel" = [ "libsixel" ]; "libskk" = [ "libskk" ]; "slirp" = [ "libslirp" ]; - "smartcols" = [ "libsmartcols" ]; + "smartcols" = [ "util-linux" ]; "libsmbios_c" = [ "libsmbios" ]; "smf" = [ "libsmf" ]; "libsmi" = [ "libsmi" ]; From 12072fc5c96f5e1714abd1a78dd560e050d3ad49 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 15 Oct 2025 12:54:52 +1300 Subject: [PATCH 33/33] Fix for wasm --- .../wasm/llvm/haskell-wasm-llvm-project.patch | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch index aebb80cb6e..49e0986bb8 100644 --- a/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch +++ b/overlays/patches/wasm/llvm/haskell-wasm-llvm-project.patch @@ -94,21 +94,6 @@ index 5054868b5ff4..e4fcd949ff71 100644 } } -diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake -index fb2aee8e42ee..a5de2dca1bc9 100644 ---- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake -+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake -@@ -390,8 +390,8 @@ function(add_compiler_rt_runtime name type) - target_link_libraries(${libname} PRIVATE ${builtins_${libname}}) - endif() - if(${type} STREQUAL "SHARED") -- if(APPLE OR WIN32) -- set_property(TARGET ${libname} PROPERTY BUILD_WITH_INSTALL_RPATH ON) -+ if(COMMAND llvm_setup_rpath) -+ llvm_setup_rpath(${libname}) - endif() - if(WIN32 AND NOT CYGWIN AND NOT MINGW) - set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp index 181221a77b10..c813e62e7b93 100644 --- a/lld/wasm/InputChunks.cpp @@ -301,25 +286,6 @@ index 83772ed8d2b1..0a7360d9357a 100644 if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-z,origin ") -@@ -2562,16 +2561,9 @@ function(llvm_setup_rpath name) - return() - endif() - -- # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set and not -- # building for macOS or AIX, as those platforms seemingly require it. -- # On AIX, the tool chain doesn't support modifying rpaths/libpaths for XCOFF -- # on install at the moment, so BUILD_WITH_INSTALL_RPATH is required. -+ # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set. - if("${CMAKE_BUILD_RPATH}" STREQUAL "") -- if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|AIX") -- set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON) -- else() -- set_property(TARGET ${name} APPEND PROPERTY BUILD_RPATH "${_build_rpath}") -- endif() -+ set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON) - endif() - - set_target_properties(${name} PROPERTIES diff --git a/llvm/lib/MC/MCParser/WasmAsmParser.cpp b/llvm/lib/MC/MCParser/WasmAsmParser.cpp index 1f824b80bcd4..1025d3ee3026 100644 --- a/llvm/lib/MC/MCParser/WasmAsmParser.cpp