From 1487a69ba45b7564ad4c37b92c55151cebac45ab Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 20 Jan 2025 17:10:26 +1300 Subject: [PATCH 01/31] Add nixpkgs-2411 and update other nixpkgs pins --- ci.nix | 3 ++- default.nix | 3 +++ flake.lock | 29 +++++++++++++++++++++++------ flake.nix | 3 ++- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/ci.nix b/ci.nix index d9378f8062..4aba1e7c9e 100644 --- a/ci.nix +++ b/ci.nix @@ -23,6 +23,7 @@ "R2305" = inputs.nixpkgs-2305; "R2311" = inputs.nixpkgs-2311; "R2405" = inputs.nixpkgs-2405; + "R2411" = inputs.nixpkgs-2411; "unstable" = inputs.nixpkgs-unstable; }; @@ -61,7 +62,7 @@ # cabal-install and nix-tools plans. When removing a ghc version # 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 (nixpkgsName == "R2405") { + nixpkgs.lib.optionalAttrs (nixpkgsName == "R2411") { ghc96 = false; ghc98 = false; } // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") { diff --git a/default.nix b/default.nix index ed9924ba00..f0898b6bc0 100644 --- a/default.nix +++ b/default.nix @@ -94,6 +94,9 @@ self // { pkgs-2405 = import self.inputs.nixpkgs-2405 (nixpkgsArgs // { localSystem = { inherit system; }; }); + pkgs-2411 = import self.inputs.nixpkgs-2411 (nixpkgsArgs // { + localSystem = { inherit system; }; + }); pkgs-unstable = import self.inputs.nixpkgs-unstable (nixpkgsArgs // { localSystem = { inherit system; }; }); diff --git a/flake.lock b/flake.lock index 9ced3131bf..72705c2d4b 100644 --- a/flake.lock +++ b/flake.lock @@ -525,11 +525,11 @@ }, "nixpkgs-2405": { "locked": { - "lastModified": 1729242558, - "narHash": "sha256-VgcLDu4igNT0eYua6OAl9pWCI0cYXhDbR+pWP44tte0=", + "lastModified": 1735564410, + "narHash": "sha256-HB/FA0+1gpSs8+/boEavrGJH+Eq08/R2wWNph1sM1Dg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a3f2d3195b60d07530574988df92e049372c10e", + "rev": "1e7a8f391f1a490460760065fa0630b5520f9cf8", "type": "github" }, "original": { @@ -539,6 +539,22 @@ "type": "github" } }, + "nixpkgs-2411": { + "locked": { + "lastModified": 1737255904, + "narHash": "sha256-r3fxHvh+M/mBgCZXOACzRFPsJdix2QSsKazb7VCXXo0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eacdab35066b0bb1c9413c96898e326b76398a81", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -557,11 +573,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1729980323, - "narHash": "sha256-eWPRZAlhf446bKSmzw6x7RWEE4IuZgAp8NW3eXZwRAY=", + "lastModified": 1737110817, + "narHash": "sha256-DSenga8XjPaUV5KUFW/i3rNkN7jm9XmguW+qQ1ZJTR4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "86e78d3d2084ff87688da662cf78c2af085d8e73", + "rev": "041c867bad68dfe34b78b2813028a2e2ea70a23c", "type": "github" }, "original": { @@ -622,6 +638,7 @@ "nixpkgs-2305": "nixpkgs-2305", "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-2405": "nixpkgs-2405", + "nixpkgs-2411": "nixpkgs-2411", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" diff --git a/flake.nix b/flake.nix index 4d7a252e95..b2e105c7e2 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,7 @@ nixpkgs-2305 = { url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; }; nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; }; nixpkgs-2405 = { url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; }; + nixpkgs-2411 = { url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; }; nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; flake-compat = { url = "github:input-output-hk/flake-compat/hkm/gitlab-fix"; flake = false; }; "hls-1.10" = { url = "github:haskell/haskell-language-server/1.10.0.0"; flake = false; }; @@ -83,7 +84,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 0; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 087fed6ee6abf4d0dd7b8c848ac97173ce1948e5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 13:30:11 +1300 Subject: [PATCH 02/31] Avoid broken nixpkgs ghc 9.0.2 (use 9.6.4 when present) --- lib/pkgconf-nixpkgs-map.nix | 8 +- .../alex-3.2.7.1/{ => ghc902}/default.nix | 0 .../alex-3.2.7.1/{ => ghc902}/plan.json | 0 .../alex-3.2.7.1/ghc964/.plan.nix/alex.nix | 141 ++++++++++++ materialized/alex-3.2.7.1/ghc964/default.nix | 101 +++++++++ materialized/alex-3.2.7.1/ghc964/plan.json | 1 + .../ghc964/hscolour/.plan.nix/hscolour.nix | 70 ++++++ .../bootstrap/ghc964/hscolour/default.nix | 66 ++++++ .../bootstrap/ghc964/hscolour/plan.json | 1 + .../happy-1.20.0/{ => ghc902}/default.nix | 0 .../happy-1.20.0/{ => ghc902}/plan.json | 0 .../happy-1.20.0/ghc964/.plan.nix/happy.nix | 201 ++++++++++++++++++ .../happy-1.20.0/ghc964/cabal-files/mtl.nix | 41 ++++ .../ghc964/cabal-files/transformers.nix | 40 ++++ materialized/happy-1.20.0/ghc964/default.nix | 69 ++++++ materialized/happy-1.20.0/ghc964/plan.json | 1 + overlays/bootstrap.nix | 16 +- 17 files changed, 747 insertions(+), 9 deletions(-) rename materialized/alex-3.2.7.1/{ => ghc902}/default.nix (100%) rename materialized/alex-3.2.7.1/{ => ghc902}/plan.json (100%) create mode 100644 materialized/alex-3.2.7.1/ghc964/.plan.nix/alex.nix create mode 100644 materialized/alex-3.2.7.1/ghc964/default.nix create mode 100644 materialized/alex-3.2.7.1/ghc964/plan.json create mode 100644 materialized/bootstrap/ghc964/hscolour/.plan.nix/hscolour.nix create mode 100644 materialized/bootstrap/ghc964/hscolour/default.nix create mode 100644 materialized/bootstrap/ghc964/hscolour/plan.json rename materialized/happy-1.20.0/{ => ghc902}/default.nix (100%) rename materialized/happy-1.20.0/{ => ghc902}/plan.json (100%) create mode 100644 materialized/happy-1.20.0/ghc964/.plan.nix/happy.nix create mode 100644 materialized/happy-1.20.0/ghc964/cabal-files/mtl.nix create mode 100644 materialized/happy-1.20.0/ghc964/cabal-files/transformers.nix create mode 100644 materialized/happy-1.20.0/ghc964/default.nix create mode 100644 materialized/happy-1.20.0/ghc964/plan.json diff --git a/lib/pkgconf-nixpkgs-map.nix b/lib/pkgconf-nixpkgs-map.nix index 0de0425815..ce835d44ad 100644 --- a/lib/pkgconf-nixpkgs-map.nix +++ b/lib/pkgconf-nixpkgs-map.nix @@ -3158,8 +3158,8 @@ pkgs: "libsodium" = [ "libsodium" ]; "libsolvext" = [ "libsolv" ]; "libsolv" = [ "libsolv" ]; - "libsoup-2.4" = [ "libsoup" ]; - "libsoup-gnome-2.4" = [ "libsoup" ]; + "libsoup-2.4" = [ "libsoup_2_4" ]; + "libsoup-gnome-2.4" = [ "libsoup_2_4" ]; "libsoup-3.0" = [ "libsoup_3" ]; "spatialaudio" = [ "libspatialaudio" ]; "libspatialindex" = [ "libspatialindex" ]; @@ -5255,8 +5255,8 @@ pkgs: "tss2-tcti-pcap" = [ "tpm2-tss" ]; "tss2-tcti-swtpm" = [ "tpm2-tss" ]; "libtracecmd" = [ "trace-cmd" ]; - "tracker-sparql-3.0" = [ "tracker" ]; - "tracker-testutils-3.0" = [ "tracker" ]; + "tracker-sparql-3.0" = [ "tinysparql" ]; + "tracker-testutils-3.0" = [ "tinysparql" ]; "trafficserver" = [ "trafficserver" ]; "tre" = [ "tre" ]; "tree-sitter" = [ "tree-sitter" ]; diff --git a/materialized/alex-3.2.7.1/default.nix b/materialized/alex-3.2.7.1/ghc902/default.nix similarity index 100% rename from materialized/alex-3.2.7.1/default.nix rename to materialized/alex-3.2.7.1/ghc902/default.nix diff --git a/materialized/alex-3.2.7.1/plan.json b/materialized/alex-3.2.7.1/ghc902/plan.json similarity index 100% rename from materialized/alex-3.2.7.1/plan.json rename to materialized/alex-3.2.7.1/ghc902/plan.json diff --git a/materialized/alex-3.2.7.1/ghc964/.plan.nix/alex.nix b/materialized/alex-3.2.7.1/ghc964/.plan.nix/alex.nix new file mode 100644 index 0000000000..f423a58952 --- /dev/null +++ b/materialized/alex-3.2.7.1/ghc964/.plan.nix/alex.nix @@ -0,0 +1,141 @@ +{ 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"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENSE" ]; + dataDir = "data/"; + dataFiles = [ "AlexTemplate.hs" "AlexWrappers.hs" ]; + extraSrcFiles = [ + "CHANGELOG.md" + "README.md" + "TODO" + "doc/Makefile" + "doc/aclocal.m4" + "doc/alex.1.in" + "doc/alex.xml" + "doc/config.mk.in" + "doc/configure.ac" + "doc/docbook-xml.mk" + "doc/fptools.css" + "examples/Makefile" + "examples/Tokens.x" + "examples/Tokens_gscan.x" + "examples/Tokens_posn.x" + "examples/examples.x" + "examples/haskell.x" + "examples/lit.x" + "examples/pp.x" + "examples/state.x" + "examples/tiny.y" + "examples/words.x" + "examples/words_monad.x" + "examples/words_posn.x" + "src/Parser.y.boot" + "src/Scan.x.boot" + "src/ghc_hooks.c" + "tests/Makefile" + "tests/simple.x" + "tests/null.x" + "tests/tokens.x" + "tests/tokens_gscan.x" + "tests/tokens_posn.x" + "tests/tokens_bytestring.x" + "tests/tokens_posn_bytestring.x" + "tests/tokens_scan_user.x" + "tests/tokens_strict_bytestring.x" + "tests/tokens_monad_bytestring.x" + "tests/tokens_monadUserState_bytestring.x" + "tests/tokens_bytestring_unicode.x" + "tests/basic_typeclass.x" + "tests/basic_typeclass_bytestring.x" + "tests/default_typeclass.x" + "tests/gscan_typeclass.x" + "tests/posn_typeclass.x" + "tests/monad_typeclass.x" + "tests/monad_typeclass_bytestring.x" + "tests/monadUserState_typeclass.x" + "tests/monadUserState_typeclass_bytestring.x" + "tests/posn_typeclass_bytestring.x" + "tests/strict_typeclass.x" + "tests/unicode.x" + "tests/issue_71.x" + "tests/issue_119.x" + "tests/issue_141.x" + "tests/issue_197.x" + ]; + extraTmpFiles = []; + extraDocFiles = []; + }; + 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; + modules = [ + "AbsSyn" + "CharSet" + "DFA" + "DFAMin" + "DFS" + "Info" + "Map" + "NFA" + "Output" + "Paths_alex" + "Parser" + "ParseMonad" + "Scan" + "Set" + "Sort" + "Util" + "UTF8" + "Data/Ranged" + "Data/Ranged/Boundaries" + "Data/Ranged/RangedSet" + "Data/Ranged/Ranges" + ]; + hsSourceDirs = [ "src" ]; + mainPath = [ "Main.hs" ]; + }; + }; + 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; + mainPath = [ "test.hs" ]; + }; + }; + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/alex-3.2.7.1/ghc964/default.nix b/materialized/alex-3.2.7.1/ghc964/default.nix new file mode 100644 index 0000000000..58975eb6f7 --- /dev/null +++ b/materialized/alex-3.2.7.1/ghc964/default.nix @@ -0,0 +1,101 @@ +{ + pkgs = hackage: + { + packages = { + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.2.0".revisions.default; + unix.revision = hackage.unix."2.8.4.0".revisions.default; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.4".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.6.0".revisions.default; + bytestring.revision = hackage.bytestring."0.11.5.3".revisions.default; + directory.revision = hackage.directory."1.3.8.1".revisions.default; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + filepath.revision = hackage.filepath."1.4.200.1".revisions.default; + }; + compiler = { + version = "9.6.4"; + nix-name = "ghc964"; + packages = { + "unix" = "2.8.4.0"; + "filepath" = "1.4.200.1"; + "transformers" = "0.6.1.0"; + "bytestring" = "0.11.5.3"; + "containers" = "0.6.7"; + "ghc-prim" = "0.10.0"; + "mtl" = "2.3.1"; + "ghc-boot-th" = "9.6.4"; + "base" = "4.18.2.0"; + "time" = "1.12.2"; + "stm" = "2.5.1.0"; + "ghc-bignum" = "1.3"; + "directory" = "1.3.8.1"; + "template-haskell" = "2.20.0.0"; + "pretty" = "1.1.3.6"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.6.0"; + "exceptions" = "0.10.7"; + }; + }; + }; + extras = hackage: + { packages = { alex = ./.plan.nix/alex.nix; }; }; + modules = [ + { + preExistingPkgs = [ + "ghc-prim" + "transformers" + "time" + "base" + "unix" + "ghc-boot-th" + "mtl" + "pretty" + "stm" + "template-haskell" + "exceptions" + "deepseq" + "containers" + "array" + "bytestring" + "directory" + "ghc-bignum" + "filepath" + ]; + } + ({ lib, ... }: + { packages = { "alex" = { flags = {}; }; }; }) + ({ lib, ... }: + { + packages = { + "directory".components.library.planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "exceptions".components.library.planned = lib.mkOverride 900 true; + "alex".components.exes."alex".planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "unix".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/alex-3.2.7.1/ghc964/plan.json b/materialized/alex-3.2.7.1/ghc964/plan.json new file mode 100644 index 0000000000..ab1d7bb99f --- /dev/null +++ b/materialized/alex-3.2.7.1/ghc964/plan.json @@ -0,0 +1 @@ +{"cabal-version":"3.10.3.0","cabal-lib-version":"3.10.3.0","compiler-id":"ghc-9.6.4","os":"osx","arch":"aarch64","install-plan":[{"type":"configured","id":"alex-3.2.7.1-inplace-alex","pkg-name":"alex","pkg-version":"3.2.7.1","flags":{},"style":"local","pkg-src":{"type":"local","path":"./."},"dist-dir":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/alex-3.2.7.1/x/alex","build-info":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/alex-3.2.7.1/x/alex/build-info.json","depends":["array-0.5.6.0","base-4.18.2.0","containers-0.6.7","directory-1.3.8.1"],"exe-depends":[],"component-name":"exe:alex","bin-file":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/alex-3.2.7.1/x/alex/build/alex/alex"},{"type":"pre-existing","id":"array-0.5.6.0","pkg-name":"array","pkg-version":"0.5.6.0","depends":["base-4.18.2.0"]},{"type":"pre-existing","id":"base-4.18.2.0","pkg-name":"base","pkg-version":"4.18.2.0","depends":["ghc-bignum-1.3","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"bytestring-0.11.5.3","pkg-name":"bytestring","pkg-version":"0.11.5.3","depends":["base-4.18.2.0","deepseq-1.4.8.1","ghc-prim-0.10.0","template-haskell-2.20.0.0"]},{"type":"pre-existing","id":"containers-0.6.7","pkg-name":"containers","pkg-version":"0.6.7","depends":["array-0.5.6.0","base-4.18.2.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":["array-0.5.6.0","base-4.18.2.0","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"directory-1.3.8.1","pkg-name":"directory","pkg-version":"1.3.8.1","depends":["base-4.18.2.0","filepath-1.4.200.1","time-1.12.2","unix-2.8.4.0"]},{"type":"pre-existing","id":"exceptions-0.10.7","pkg-name":"exceptions","pkg-version":"0.10.7","depends":["base-4.18.2.0","mtl-2.3.1","stm-2.5.1.0","template-haskell-2.20.0.0","transformers-0.6.1.0"]},{"type":"pre-existing","id":"filepath-1.4.200.1","pkg-name":"filepath","pkg-version":"1.4.200.1","depends":["base-4.18.2.0","bytestring-0.11.5.3","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.4","pkg-name":"ghc-boot-th","pkg-version":"9.6.4","depends":["base-4.18.2.0"]},{"type":"pre-existing","id":"ghc-prim-0.10.0","pkg-name":"ghc-prim","pkg-version":"0.10.0","depends":[]},{"type":"pre-existing","id":"mtl-2.3.1","pkg-name":"mtl","pkg-version":"2.3.1","depends":["base-4.18.2.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.2.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":["array-0.5.6.0","base-4.18.2.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.2.0","ghc-boot-th-9.6.4","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.2.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.2.0","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"unix-2.8.4.0","pkg-name":"unix","pkg-version":"2.8.4.0","depends":["base-4.18.2.0","bytestring-0.11.5.3","filepath-1.4.200.1","time-1.12.2"]}],"targets":[{"pkg-name":"alex","pkg-version":"3.2.7.1","component-name":"exe:alex","available":[{"id":"alex-3.2.7.1-inplace-alex","component-name":"exe:alex","build-by-default":true}]},{"pkg-name":"alex","pkg-version":"3.2.7.1","component-name":"test:tests","available":["TargetDisabledByUser"]},{"pkg-name":"array","pkg-version":"0.5.6.0","component-name":"lib","available":[{"id":"array-0.5.6.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"base","pkg-version":"4.18.2.0","component-name":"lib","available":[{"id":"base-4.18.2.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"bytestring","pkg-version":"0.11.5.3","component-name":"lib","available":[{"id":"bytestring-0.11.5.3","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.1","component-name":"lib","available":[{"id":"directory-1.3.8.1","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.200.1","component-name":"lib","available":[{"id":"filepath-1.4.200.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.4","component-name":"lib","available":[{"id":"ghc-boot-th-9.6.4","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.4.0","component-name":"lib","available":[{"id":"unix-2.8.4.0","component-name":"lib","build-by-default":true}]}]} \ No newline at end of file diff --git a/materialized/bootstrap/ghc964/hscolour/.plan.nix/hscolour.nix b/materialized/bootstrap/ghc964/hscolour/.plan.nix/hscolour.nix new file mode 100644 index 0000000000..2953159025 --- /dev/null +++ b/materialized/bootstrap/ghc964/hscolour/.plan.nix/hscolour.nix @@ -0,0 +1,70 @@ +{ 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"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENCE-LGPL" ]; + dataDir = "."; + dataFiles = [ "hscolour.css" "data/rgb24-example-.hscolour" ]; + extraSrcFiles = []; + extraTmpFiles = []; + extraDocFiles = []; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ]; + buildable = true; + modules = [ + "Language/Haskell/HsColour" + "Language/Haskell/HsColour/ANSI" + "Language/Haskell/HsColour/Anchors" + "Language/Haskell/HsColour/ACSS" + "Language/Haskell/HsColour/CSS" + "Language/Haskell/HsColour/Classify" + "Language/Haskell/HsColour/ColourHighlight" + "Language/Haskell/HsColour/Colourise" + "Language/Haskell/HsColour/General" + "Language/Haskell/HsColour/HTML" + "Language/Haskell/HsColour/InlineCSS" + "Language/Haskell/HsColour/LaTeX" + "Language/Haskell/HsColour/MIRC" + "Language/Haskell/HsColour/Options" + "Language/Haskell/HsColour/Output" + "Language/Haskell/HsColour/TTY" + ]; + }; + exes = { + "HsColour" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ]; + buildable = true; + mainPath = [ "HsColour.hs" ]; + }; + }; + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/bootstrap/ghc964/hscolour/default.nix b/materialized/bootstrap/ghc964/hscolour/default.nix new file mode 100644 index 0000000000..553ec0241b --- /dev/null +++ b/materialized/bootstrap/ghc964/hscolour/default.nix @@ -0,0 +1,66 @@ +{ + pkgs = hackage: + { + packages = { + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + base.revision = hackage.base."4.18.2.0".revisions.default; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.4".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.6.0".revisions.default; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + }; + compiler = { + version = "9.6.4"; + nix-name = "ghc964"; + packages = { + "containers" = "0.6.7"; + "ghc-prim" = "0.10.0"; + "ghc-boot-th" = "9.6.4"; + "base" = "4.18.2.0"; + "ghc-bignum" = "1.3"; + "template-haskell" = "2.20.0.0"; + "pretty" = "1.1.3.6"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.6.0"; + }; + }; + }; + extras = hackage: + { packages = { hscolour = ./.plan.nix/hscolour.nix; }; }; + modules = [ + { + preExistingPkgs = [ + "ghc-prim" + "base" + "ghc-boot-th" + "pretty" + "template-haskell" + "deepseq" + "containers" + "array" + "ghc-bignum" + ]; + } + ({ lib, ... }: + { packages = { "hscolour" = { flags = {}; }; }; }) + ({ lib, ... }: + { + packages = { + "hscolour".components.library.planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "hscolour".components.exes."HsColour".planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/bootstrap/ghc964/hscolour/plan.json b/materialized/bootstrap/ghc964/hscolour/plan.json new file mode 100644 index 0000000000..050efda90c --- /dev/null +++ b/materialized/bootstrap/ghc964/hscolour/plan.json @@ -0,0 +1 @@ +{"cabal-version":"3.10.3.0","cabal-lib-version":"3.10.3.0","compiler-id":"ghc-9.6.4","os":"osx","arch":"aarch64","install-plan":[{"type":"pre-existing","id":"array-0.5.6.0","pkg-name":"array","pkg-version":"0.5.6.0","depends":["base-4.18.2.0"]},{"type":"pre-existing","id":"base-4.18.2.0","pkg-name":"base","pkg-version":"4.18.2.0","depends":["ghc-bignum-1.3","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"containers-0.6.7","pkg-name":"containers","pkg-version":"0.6.7","depends":["array-0.5.6.0","base-4.18.2.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":["array-0.5.6.0","base-4.18.2.0","ghc-prim-0.10.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.4","pkg-name":"ghc-boot-th","pkg-version":"9.6.4","depends":["base-4.18.2.0"]},{"type":"pre-existing","id":"ghc-prim-0.10.0","pkg-name":"ghc-prim","pkg-version":"0.10.0","depends":[]},{"type":"configured","id":"hscolour-1.24.4-inplace","pkg-name":"hscolour","pkg-version":"1.24.4","flags":{},"style":"local","pkg-src":{"type":"local","path":"./."},"dist-dir":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/hscolour-1.24.4","build-info":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/hscolour-1.24.4/build-info.json","components":{"lib":{"depends":["base-4.18.2.0","containers-0.6.7"],"exe-depends":[]},"exe:HsColour":{"depends":["base-4.18.2.0","containers-0.6.7"],"exe-depends":[],"bin-file":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/hscolour-1.24.4/build/HsColour/HsColour"}}},{"type":"pre-existing","id":"pretty-1.1.3.6","pkg-name":"pretty","pkg-version":"1.1.3.6","depends":["base-4.18.2.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.2.0","ghc-boot-th-9.6.4","ghc-prim-0.10.0","pretty-1.1.3.6"]}],"targets":[{"pkg-name":"array","pkg-version":"0.5.6.0","component-name":"lib","available":[{"id":"array-0.5.6.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"base","pkg-version":"4.18.2.0","component-name":"lib","available":[{"id":"base-4.18.2.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.4","component-name":"lib","available":[{"id":"ghc-boot-th-9.6.4","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":"hscolour-1.24.4-inplace","component-name":"lib","build-by-default":true}]},{"pkg-name":"hscolour","pkg-version":"1.24.4","component-name":"exe:HsColour","available":[{"id":"hscolour-1.24.4-inplace","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/default.nix b/materialized/happy-1.20.0/ghc902/default.nix similarity index 100% rename from materialized/happy-1.20.0/default.nix rename to materialized/happy-1.20.0/ghc902/default.nix diff --git a/materialized/happy-1.20.0/plan.json b/materialized/happy-1.20.0/ghc902/plan.json similarity index 100% rename from materialized/happy-1.20.0/plan.json rename to materialized/happy-1.20.0/ghc902/plan.json diff --git a/materialized/happy-1.20.0/ghc964/.plan.nix/happy.nix b/materialized/happy-1.20.0/ghc964/.plan.nix/happy.nix new file mode 100644 index 0000000000..913958f32f --- /dev/null +++ b/materialized/happy-1.20.0/ghc964/.plan.nix/happy.nix @@ -0,0 +1,201 @@ +{ 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"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENSE" ]; + dataDir = "data/"; + dataFiles = [ + "HappyTemplate" + "HappyTemplate-arrays" + "HappyTemplate-arrays-coerce" + "HappyTemplate-arrays-coerce-debug" + "HappyTemplate-arrays-debug" + "HappyTemplate-arrays-ghc" + "HappyTemplate-arrays-ghc-debug" + "HappyTemplate-coerce" + "HappyTemplate-ghc" + "GLR_Base" + "GLR_Lib" + "GLR_Lib-ghc" + "GLR_Lib-ghc-debug" + ]; + extraSrcFiles = [ + "ANNOUNCE" + "CHANGES" + "Makefile" + "README.md" + "TODO" + "doc/Makefile" + "doc/aclocal.m4" + "doc/config.mk.in" + "doc/configure.ac" + "doc/docbook-xml.mk" + "doc/fptools.css" + "doc/happy.1.in" + "doc/happy.xml" + "examples/glr/nlp/Main.lhs" + "examples/glr/nlp/Makefile" + "examples/glr/nlp/README" + "examples/glr/nlp/English.y" + "examples/glr/nlp/Hugs.lhs" + "examples/glr/Makefile" + "examples/glr/Makefile.defs" + "examples/glr/expr-eval/Main.lhs" + "examples/glr/expr-eval/Makefile" + "examples/glr/expr-eval/Expr.y" + "examples/glr/expr-eval/README" + "examples/glr/expr-eval/Hugs.lhs" + "examples/glr/expr-tree/Main.lhs" + "examples/glr/expr-tree/Makefile" + "examples/glr/expr-tree/Expr.y" + "examples/glr/expr-tree/README" + "examples/glr/expr-tree/Tree.lhs" + "examples/glr/expr-tree/Hugs.lhs" + "examples/glr/highly-ambiguous/Main.lhs" + "examples/glr/highly-ambiguous/Makefile" + "examples/glr/highly-ambiguous/Expr.y" + "examples/glr/highly-ambiguous/README" + "examples/glr/highly-ambiguous/Hugs.lhs" + "examples/glr/hidden-leftrec/Main.lhs" + "examples/glr/hidden-leftrec/Makefile" + "examples/glr/hidden-leftrec/Expr.y" + "examples/glr/hidden-leftrec/README" + "examples/glr/hidden-leftrec/Hugs.lhs" + "examples/glr/expr-monad/Main.lhs" + "examples/glr/expr-monad/Makefile" + "examples/glr/expr-monad/Expr.y" + "examples/glr/expr-monad/README" + "examples/glr/expr-monad/Hugs.lhs" + "examples/glr/bio-eg/Main.lhs" + "examples/glr/bio-eg/Makefile" + "examples/glr/bio-eg/Bio.y" + "examples/glr/bio-eg/README" + "examples/glr/bio-eg/1-1200.dna" + "examples/glr/bio-eg/1-600.dna" + "examples/glr/common/DV_lhs" + "examples/glr/common/DaVinciTypes.hs" + "examples/glr/packing/Main.lhs" + "examples/glr/packing/Makefile" + "examples/glr/packing/Expr.y" + "examples/glr/packing/README" + "examples/glr/packing/Hugs.lhs" + "examples/PgnParser.ly" + "examples/MonadTest.ly" + "examples/igloo/ParserM.hs" + "examples/igloo/Makefile" + "examples/igloo/Parser.y" + "examples/igloo/Foo.hs" + "examples/igloo/README" + "examples/igloo/Lexer.x" + "examples/README" + "examples/Calc.ly" + "examples/DavesExample.ly" + "examples/ErrorTest.ly" + "examples/ErlParser.ly" + "examples/SimonsExample.ly" + "examples/LexerTest.ly" + "happy.spec" + "src/ARRAY-NOTES" + "tests/AttrGrammar001.y" + "tests/AttrGrammar002.y" + "tests/Makefile" + "tests/Partial.ly" + "tests/Test.ly" + "tests/TestMulti.ly" + "tests/TestPrecedence.ly" + "tests/bogus-token.y" + "tests/bug001.ly" + "tests/bug002.y" + "tests/error001.stderr" + "tests/error001.stdout" + "tests/error001.y" + "tests/monad001.y" + "tests/monad002.ly" + "tests/monaderror.y" + "tests/precedence001.ly" + "tests/precedence002.y" + "tests/test_rules.y" + "tests/issue91.y" + "tests/issue93.y" + "tests/issue94.y" + "tests/issue95.y" + "tests/monaderror-explist.y" + "tests/typeclass_monad001.y" + "tests/typeclass_monad002.ly" + "tests/typeclass_monad_lexer.y" + "tests/rank2.y" + "tests/shift01.y" + ]; + extraTmpFiles = []; + extraDocFiles = []; + }; + 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; + modules = [ + "Paths_happy" + "AbsSyn" + "First" + "GenUtils" + "Grammar" + "Info" + "LALR" + "Lexer" + "ParseMonad" + "Parser" + "ProduceCode" + "ProduceGLRCode" + "NameSet" + "Target" + "AttrGrammar" + "AttrGrammarParser" + "ParamRules" + "PrettyGrammar" + ]; + hsSourceDirs = [ "src" ]; + mainPath = [ "Main.lhs" ]; + }; + }; + 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; + mainPath = [ "test.hs" ]; + }; + }; + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/happy-1.20.0/ghc964/cabal-files/mtl.nix b/materialized/happy-1.20.0/ghc964/cabal-files/mtl.nix new file mode 100644 index 0000000000..36fa049c2d --- /dev/null +++ b/materialized/happy-1.20.0/ghc964/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/ghc964/cabal-files/transformers.nix b/materialized/happy-1.20.0/ghc964/cabal-files/transformers.nix new file mode 100644 index 0000000000..288d680c82 --- /dev/null +++ b/materialized/happy-1.20.0/ghc964/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/ghc964/default.nix b/materialized/happy-1.20.0/ghc964/default.nix new file mode 100644 index 0000000000..0ce08e0ee0 --- /dev/null +++ b/materialized/happy-1.20.0/ghc964/default.nix @@ -0,0 +1,69 @@ +{ + pkgs = hackage: + { + packages = { + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + transformers.revision = import ./cabal-files/transformers.nix; + base.revision = hackage.base."4.18.2.0".revisions.default; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.4".revisions.default; + mtl.revision = import ./cabal-files/mtl.nix; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.6.0".revisions.default; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + }; + compiler = { + version = "9.6.4"; + nix-name = "ghc964"; + packages = { + "containers" = "0.6.7"; + "ghc-prim" = "0.10.0"; + "ghc-boot-th" = "9.6.4"; + "base" = "4.18.2.0"; + "ghc-bignum" = "1.3"; + "template-haskell" = "2.20.0.0"; + "pretty" = "1.1.3.6"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.6.0"; + }; + }; + }; + extras = hackage: + { packages = { happy = ./.plan.nix/happy.nix; }; }; + modules = [ + { + preExistingPkgs = [ + "ghc-prim" + "base" + "ghc-boot-th" + "pretty" + "template-haskell" + "deepseq" + "containers" + "array" + "ghc-bignum" + ]; + } + ({ lib, ... }: + { packages = { "happy" = { flags = {}; }; }; }) + ({ lib, ... }: + { + packages = { + "deepseq".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "happy".components.exes."happy".planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/happy-1.20.0/ghc964/plan.json b/materialized/happy-1.20.0/ghc964/plan.json new file mode 100644 index 0000000000..b850d97293 --- /dev/null +++ b/materialized/happy-1.20.0/ghc964/plan.json @@ -0,0 +1 @@ +{"cabal-version":"3.10.3.0","cabal-lib-version":"3.10.3.0","compiler-id":"ghc-9.6.4","os":"osx","arch":"aarch64","install-plan":[{"type":"pre-existing","id":"array-0.5.6.0","pkg-name":"array","pkg-version":"0.5.6.0","depends":["base-4.18.2.0"]},{"type":"pre-existing","id":"base-4.18.2.0","pkg-name":"base","pkg-version":"4.18.2.0","depends":["ghc-bignum-1.3","ghc-prim-0.10.0"]},{"type":"pre-existing","id":"containers-0.6.7","pkg-name":"containers","pkg-version":"0.6.7","depends":["array-0.5.6.0","base-4.18.2.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":["array-0.5.6.0","base-4.18.2.0","ghc-prim-0.10.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.4","pkg-name":"ghc-boot-th","pkg-version":"9.6.4","depends":["base-4.18.2.0"]},{"type":"pre-existing","id":"ghc-prim-0.10.0","pkg-name":"ghc-prim","pkg-version":"0.10.0","depends":[]},{"type":"configured","id":"happy-1.20.0-inplace-happy","pkg-name":"happy","pkg-version":"1.20.0","flags":{},"style":"local","pkg-src":{"type":"local","path":"./."},"dist-dir":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/happy-1.20.0/x/happy","build-info":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/happy-1.20.0/x/happy/build-info.json","depends":["array-0.5.6.0","base-4.18.2.0","containers-0.6.7","mtl-2.2.2-984c586c"],"exe-depends":[],"component-name":"exe:happy","bin-file":"./dist-newstyle/build/aarch64-osx/ghc-9.6.4/happy-1.20.0/x/happy/build/happy/happy"},{"type":"configured","id":"mtl-2.2.2-984c586c","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.2.0","trnsfrmrs-0.5.6.2-48a34482"],"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.2.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.2.0","ghc-boot-th-9.6.4","ghc-prim-0.10.0","pretty-1.1.3.6"]},{"type":"configured","id":"trnsfrmrs-0.5.6.2-48a34482","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.2.0"],"exe-depends":[]}}}],"targets":[{"pkg-name":"array","pkg-version":"0.5.6.0","component-name":"lib","available":[{"id":"array-0.5.6.0","component-name":"lib","build-by-default":true}]},{"pkg-name":"base","pkg-version":"4.18.2.0","component-name":"lib","available":[{"id":"base-4.18.2.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.4","component-name":"lib","available":[{"id":"ghc-boot-th-9.6.4","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":"happy-1.20.0-inplace-happy","component-name":"exe:happy","build-by-default":true}]},{"pkg-name":"happy","pkg-version":"1.20.0","component-name":"test:tests","available":["TargetDisabledByUser"]},{"pkg-name":"mtl","pkg-version":"2.2.2","component-name":"lib","available":[{"id":"mtl-2.2.2-984c586c","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-48a34482","component-name":"lib","build-by-default":true}]}]} \ No newline at end of file diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 73628c024c..9bd89f95cc 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1,6 +1,8 @@ final: prev: let - buildBootstrapper.compilerNixName = "ghc8107"; + buildBootstrapper.compilerNixName = + if final.buildPackages.haskell.compiler ? ghc964 then "ghc964" + else "ghc8107"; latestVerMap = { "8.10" = "8.10.7"; "9.0" = "9.0.2"; @@ -45,18 +47,22 @@ in { ghc = final.buildPackages.buildPackages.haskell-nix.bootstrap.compiler."${buildBootstrapper.compilerNixName}"; inherit (final.haskell-nix.bootstrap.packages) alex happy hscolour; }; + # 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" + else "ghc902"; bootPkgsGhc94 = bootPkgs // { - alex = final.buildPackages.haskell-nix.tool "ghc902" "alex" { + alex = final.buildPackages.haskell-nix.tool nixpkgsBootCompiler "alex" { compilerSelection = p: p.haskell.compiler; version = "3.2.7.1"; index-state = final.haskell-nix.internalHackageIndexState; - materialized = ../materialized/alex-3.2.7.1; + materialized = ../materialized/alex-3.2.7.1/${nixpkgsBootCompiler}; }; - happy = final.buildPackages.haskell-nix.tool "ghc902" "happy" { + happy = final.buildPackages.haskell-nix.tool nixpkgsBootCompiler "happy" { compilerSelection = p: p.haskell.compiler; version = "1.20.0"; index-state = final.haskell-nix.internalHackageIndexState; - materialized = ../materialized/happy-1.20.0; + materialized = ../materialized/happy-1.20.0/${nixpkgsBootCompiler}; }; }; sphinx = final.buildPackages.sphinx; From 5b8608cabc39dbbdf9d711056c6a5747fa296467 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 13:52:53 +1300 Subject: [PATCH 03/31] Relax version check --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 9bd89f95cc..b168e6ed43 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -27,7 +27,7 @@ let (builtins.attrNames latestVerMap)); traceWarnOld = v: x: let - bootstrapGhc = final.buildPackages.haskell-nix.bootstrap.compiler."${buildBootstrapper.compilerNixName}"; + bootstrapGhc = final.buildPackages.haskell-nix.bootstrap.compiler.ghc8107; 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})." From 7d3f24bea82c0fc443e4697723786d42a8fbf46d Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 14:49:21 +1300 Subject: [PATCH 04/31] Fix for ghc 9.10.1 --- overlays/bootstrap.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index b168e6ed43..9e3f4d1fd7 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -894,9 +894,10 @@ in { bootPkgs = bootPkgsGhc94 // { ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9101 - else final.buildPackages.buildPackages.haskell.compiler.ghc984 - or final.buildPackages.buildPackages.haskell.compiler.ghc983 - or final.buildPackages.buildPackages.haskell.compiler.ghc982 + else # GHC 9.10.1 does not seem to build with ghc 9.8.4 + # final.buildPackages.buildPackages.haskell.compiler.ghc984 + # or final.buildPackages.buildPackages.haskell.compiler.ghc983 + final.buildPackages.buildPackages.haskell.compiler.ghc982 or final.buildPackages.buildPackages.haskell.compiler.ghc981 or final.buildPackages.buildPackages.haskell.compiler.ghc966 or final.buildPackages.buildPackages.haskell.compiler.ghc965 From 57db6efeee20c1da4e987b9f91dd5ebbb936ade7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 15:14:06 +1300 Subject: [PATCH 05/31] Stick with ghc 8.10.7 for old versions of alex and happy --- overlays/bootstrap.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 9e3f4d1fd7..f2b56dad76 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1110,13 +1110,13 @@ in { # hackage with haskell.nix. For alex and happy we # need to use the boot strap compiler as we need them # to build ghcs from source. - alex = final.haskell-nix.tool buildBootstrapper.compilerNixName "alex" ({config, pkgs, ...}: { + alex = final.haskell-nix.tool "ghc8107" "alex" ({config, pkgs, ...}: { compilerSelection = p: p.haskell.compiler; version = "3.2.4"; inherit ghcOverride index-state; materialized = ../materialized/bootstrap + "/${buildBootstrapper.compilerNixName}/alex"; }); - happy = final.haskell-nix.tool buildBootstrapper.compilerNixName "happy" + happy = final.haskell-nix.tool "ghc8107" "happy" ({config, pkgs, ...}: { compilerSelection = p: p.haskell.compiler; version = "1.19.12"; From 277b592667b951d5a8cf0ebbe7112e67cb4b9d13 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 15:27:13 +1300 Subject: [PATCH 06/31] Fix for GHC 8.10.7 --- overlays/bootstrap.nix | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index f2b56dad76..6b725ab265 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -27,7 +27,7 @@ let (builtins.attrNames latestVerMap)); traceWarnOld = v: x: let - bootstrapGhc = final.buildPackages.haskell-nix.bootstrap.compiler.ghc8107; + bootstrapGhc = final.buildPackages.haskell.compiler.ghc8107; 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})." @@ -1094,17 +1094,7 @@ in { # hence we'll use 844 for bootstrapping for now. # the bootstrap infrastructure (pre-compiled ghc; bootstrapped cabal-install, ...) - bootstrap = - let - # This compiler-nix-name will only be used to build nix-tools and cabal-install - # when checking materialization of alex, happy and hscolour. - compiler-nix-name = buildBootstrapper.compilerNixName; - # The ghc boot compiler to use to compile alex, happy and hscolour - ghcOverride = final.buildPackages.haskell-nix.bootstrap.compiler.${compiler-nix-name}; - index-state = final.haskell-nix.internalHackageIndexState; - in { - compiler = final.haskell.compiler; - packages = { + bootstrap.packages = { # now that we have nix-tools and hpack, we can just # use `hackage-package` to build any package from # hackage with haskell.nix. For alex and happy we @@ -1113,15 +1103,15 @@ in { alex = final.haskell-nix.tool "ghc8107" "alex" ({config, pkgs, ...}: { compilerSelection = p: p.haskell.compiler; version = "3.2.4"; - inherit ghcOverride index-state; - materialized = ../materialized/bootstrap + "/${buildBootstrapper.compilerNixName}/alex"; + index-state = final.haskell-nix.internalHackageIndexState; + materialized = ../materialized/bootstrap/ghc8107/alex; }); happy = final.haskell-nix.tool "ghc8107" "happy" ({config, pkgs, ...}: { compilerSelection = p: p.haskell.compiler; version = "1.19.12"; - inherit ghcOverride index-state; - materialized = ../materialized/bootstrap + "/${buildBootstrapper.compilerNixName}/happy-1.19.12"; + index-state = final.haskell-nix.internalHackageIndexState; + materialized = ../materialized/bootstrap/ghc8107/happy-1.19.12; }); hscolour = (final.haskell-nix.hackage-package ({config, pkgs, ...}: { @@ -1129,10 +1119,9 @@ in { compiler-nix-name = buildBootstrapper.compilerNixName; name = "hscolour"; version = "1.24.4"; - inherit ghcOverride index-state; + index-state = final.haskell-nix.internalHackageIndexState; materialized = ../materialized/bootstrap + "/${buildBootstrapper.compilerNixName}/hscolour"; })).getComponent "exe:HsColour"; - }; }; }; } From 003ea699754f96bd77a287719b4c5f5f5b70f4c0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 16:29:19 +1300 Subject: [PATCH 07/31] Fix warning from srcOnly --- compiler/ghc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 1bafff3d33..9251d35747 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -295,6 +295,7 @@ let src = haskell-nix.haskellLib.cleanSourceWith { src = { outPath = buildPackages.srcOnly { + stdenv = buildPackages.stdenvNoCC; name = "hadrian"; inherit src; }; From 7b4cfe02d76bd0e32a99ed2c5688af8bfb9cd926 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 22:39:50 +1300 Subject: [PATCH 08/31] Avoid https://gitlab.haskell.org/ghc/ghc/-/issues/25608 --- ci.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci.nix b/ci.nix index 4aba1e7c9e..e1a6cf29a1 100644 --- a/ci.nix +++ b/ci.nix @@ -63,12 +63,12 @@ # 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 (nixpkgsName == "R2411") { - ghc96 = false; - ghc98 = false; - } // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") { ghc810 = true; ghc92 = false; ghc94 = false; + ghc96 = false; + ghc98 = false; + } // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") { ghc96 = true; ghc98 = true; ghc98llvm = false; From 3da55331af1cf0b39a861e82b606e118566e8863 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jan 2025 23:45:57 +1300 Subject: [PATCH 09/31] Only patch rcodesign 0.22.0 --- overlays/rcodesign.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/rcodesign.nix b/overlays/rcodesign.nix index 04d3fcc72b..de09a93f48 100644 --- a/overlays/rcodesign.nix +++ b/overlays/rcodesign.nix @@ -2,7 +2,7 @@ # versions of macOS (one of the tests fails validating signatures # in `/usr/bin`). final: prev: { - rcodesign = prev.rcodesign.override (old: { + rcodesign = prev.rcodesign.override (old: final.lib.optionalAttrs (prev.rcodesign.version == "0.22.0") { rustPlatform = old.rustPlatform // { buildRustPackage = args: old.rustPlatform.buildRustPackage (args // { version = "0.27.0"; From 1297ba09883fa1b7732c29167e7b17d13dce539e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 01:11:37 +1300 Subject: [PATCH 10/31] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index b2e105c7e2..b02d3a5545 100644 --- a/flake.nix +++ b/flake.nix @@ -84,7 +84,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From cee54061a955b836febf4c0377d50f3f5cd7da8e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 02:08:09 +1300 Subject: [PATCH 11/31] Remove ghc boot tools from roots (having ghc in roots should be enough) --- overlays/haskell.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/overlays/haskell.nix b/overlays/haskell.nix index 76b917ffe4..07b3fdce46 100644 --- a/overlays/haskell.nix +++ b/overlays/haskell.nix @@ -1088,9 +1088,6 @@ final: prev: { inherit (final) glibcLocales; } // final.lib.optionalAttrs (ifdLevel > 0) { # Things that require one IFD to build (the inputs should be in level 0) - boot-alex = final.buildPackages.haskell-nix.bootstrap.packages.alex; - boot-happy = final.buildPackages.haskell-nix.bootstrap.packages.happy; - boot-hscolour = final.buildPackages.haskell-nix.bootstrap.packages.hscolour; ghc = final.buildPackages.haskell-nix.compiler.${compiler-nix-name}; ghc-boot-packages-nix = final.recurseIntoAttrs final.ghc-boot-packages-nix.${compiler-nix-name}; From 3ed2d17320b5d188d2dab76106d454a67ca38589 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 28 Nov 2024 15:29:04 +1300 Subject: [PATCH 12/31] Add missing casts --- overlays/patches/ghc/ghc-9.6-missing-symbols-deadbeef.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlays/patches/ghc/ghc-9.6-missing-symbols-deadbeef.patch b/overlays/patches/ghc/ghc-9.6-missing-symbols-deadbeef.patch index cd02ae8291..d767074b9c 100644 --- a/overlays/patches/ghc/ghc-9.6-missing-symbols-deadbeef.patch +++ b/overlays/patches/ghc/ghc-9.6-missing-symbols-deadbeef.patch @@ -8,7 +8,7 @@ index 4d0c978..96a9d60 100644 symbol->name); - return EXIT_FAILURE; + // return EXIT_FAILURE; -+ symbol->addr = 0xDEADBEEF; ++ symbol->addr = (void*)0xDEADBEEF; } } } else { @@ -20,7 +20,7 @@ index 2356818..727e845 100644 "See top entry above.\n", lbl); IF_DEBUG(linker, printLoadedObjects()); fflush(stderr); -+ r = 0xDEADBEEF; ++ r = (void*)0xDEADBEEF; } if (!runPendingInitializers()) { From 5150d702f8e76e03aada2ff1ffcda8ee24b4d56e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 11:30:58 +1300 Subject: [PATCH 13/31] Fix for windows cross compilation --- overlays/bootstrap.nix | 3 + .../ghc-win32-io-manager-compilation.patch | 126 ++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 overlays/patches/ghc/ghc-win32-io-manager-compilation.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 6b725ab265..89e46db779 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -281,6 +281,9 @@ in { # See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13709 ++ fromUntil "9.8.4" "9.8.5" ./patches/ghc/ghc-9.8.4-remove-unused-containers-h-include13709.diff + + # See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12586 + ++ onWindows (until "9.12" ./patches/ghc/ghc-win32-io-manager-compilation.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { diff --git a/overlays/patches/ghc/ghc-win32-io-manager-compilation.patch b/overlays/patches/ghc/ghc-win32-io-manager-compilation.patch new file mode 100644 index 0000000000..c32a0a27c7 --- /dev/null +++ b/overlays/patches/ghc/ghc-win32-io-manager-compilation.patch @@ -0,0 +1,126 @@ +From 710665bdd48b055d763c30b88d690fadd46a03af Mon Sep 17 00:00:00 2001 +From: Cheng Shao +Date: Mon, 6 May 2024 19:25:32 +0000 +Subject: [PATCH] rts: fix I/O manager compilation errors for win32 target + +This patch fixes I/O manager compilation errors for win32 target +discovered when cross-compiling to win32 using recent clang: + +``` +rts/win32/ThrIOManager.c:117:7: error: + error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + 117 | if (is_io_mng_native_p ()) { + | ^ + | +117 | if (is_io_mng_native_p ()) { + | ^ + +1 error generated. +`x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) + +rts/fs.c:143:28: error: + error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] + 143 | int setErrNoFromWin32Error () { + | ^ + | void + | +143 | int setErrNoFromWin32Error () { + | ^ + +1 error generated. +`x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) + +rts/win32/ConsoleHandler.c:227:9: error: + error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + 227 | interruptIOManagerEvent (); + | ^ + | +227 | interruptIOManagerEvent (); + | ^ + +rts/win32/ConsoleHandler.c:227:9: error: + note: did you mean 'getIOManagerEvent'? + | +227 | interruptIOManagerEvent (); + | ^ + +rts/include/rts/IOInterface.h:27:10: error: + note: 'getIOManagerEvent' declared here + 27 | void * getIOManagerEvent (void); + | ^ + | +27 | void * getIOManagerEvent (void); + | ^ + +1 error generated. +`x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) + +rts/win32/ConsoleHandler.c:196:9: error: + error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + 196 | setThreadLabel(cap, t, "signal handler thread"); + | ^ + | +196 | setThreadLabel(cap, t, "signal handler thread"); + | ^ + +rts/win32/ConsoleHandler.c:196:9: error: + note: did you mean 'postThreadLabel'? + | +196 | setThreadLabel(cap, t, "signal handler thread"); + | ^ + +rts/eventlog/EventLog.h:118:6: error: + note: 'postThreadLabel' declared here + 118 | void postThreadLabel(Capability *cap, + | ^ + | +118 | void postThreadLabel(Capability *cap, + | ^ + +1 error generated. +`x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) +``` +--- + rts/win32/ConsoleHandler.c | 2 ++ + rts/win32/ThrIOManager.c | 1 + + utils/fs/fs.c | 2 +- + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/rts/win32/ConsoleHandler.c b/rts/win32/ConsoleHandler.c +index 848d29288d8a..f6018f34a8cd 100644 +--- a/rts/win32/ConsoleHandler.c ++++ b/rts/win32/ConsoleHandler.c +@@ -5,6 +5,8 @@ + * For the WINIO manager see base in the GHC.Event modules. + */ + #include "Rts.h" ++#include "MIOManager.h" ++#include "ThreadLabels.h" + #include + #include "ConsoleHandler.h" + #include "Schedule.h" +diff --git a/rts/win32/ThrIOManager.c b/rts/win32/ThrIOManager.c +index 023aee4c1922..61ccd5379c28 100644 +--- a/rts/win32/ThrIOManager.c ++++ b/rts/win32/ThrIOManager.c +@@ -9,6 +9,7 @@ + * ---------------------------------------------------------------------------*/ + + #include "Rts.h" ++#include "IOManager.h" + #include "ThrIOManager.h" + #include "MIOManager.h" + #include "rts/OSThreads.h" +diff --git a/utils/fs/fs.c b/utils/fs/fs.c +index a5377af7e2bc..d64094cae158 100644 +--- a/utils/fs/fs.c ++++ b/utils/fs/fs.c +@@ -140,7 +140,7 @@ static int setErrNoFromWin32Error (void); + This function should only be called when the creation of the fd actually + failed and you want to return -1 for the fd. */ + static +-int setErrNoFromWin32Error () { ++int setErrNoFromWin32Error (void) { + switch (GetLastError()) { + case ERROR_SUCCESS: + errno = 0; From cb6f1de4b2e4485dfe8d9627f00d984240dbda52 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 12:06:18 +1300 Subject: [PATCH 14/31] Fix for windows cross compilation --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 89e46db779..0c52157739 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -283,7 +283,7 @@ in { ++ fromUntil "9.8.4" "9.8.5" ./patches/ghc/ghc-9.8.4-remove-unused-containers-h-include13709.diff # See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12586 - ++ onWindows (until "9.12" ./patches/ghc/ghc-win32-io-manager-compilation.patch) + ++ onWindows (fromUntil "9.6.6" "9.12" ./patches/ghc/ghc-win32-io-manager-compilation.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { From 9788b83c99f2936e5a2490ad8ef7d653e1a34a3e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 12:15:50 +1300 Subject: [PATCH 15/31] is_io_mng_native_p is in RtsFlags.h for older versions of GHC --- overlays/patches/ghc/ghc-win32-io-manager-compilation.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overlays/patches/ghc/ghc-win32-io-manager-compilation.patch b/overlays/patches/ghc/ghc-win32-io-manager-compilation.patch index c32a0a27c7..17cb024fcf 100644 --- a/overlays/patches/ghc/ghc-win32-io-manager-compilation.patch +++ b/overlays/patches/ghc/ghc-win32-io-manager-compilation.patch @@ -103,10 +103,11 @@ diff --git a/rts/win32/ThrIOManager.c b/rts/win32/ThrIOManager.c index 023aee4c1922..61ccd5379c28 100644 --- a/rts/win32/ThrIOManager.c +++ b/rts/win32/ThrIOManager.c -@@ -9,6 +9,7 @@ +@@ -9,6 +9,8 @@ * ---------------------------------------------------------------------------*/ #include "Rts.h" ++#include "RtsFlags.h" +#include "IOManager.h" #include "ThrIOManager.h" #include "MIOManager.h" From cd556c062d8084ed0002c81a7107101f8e5c90a2 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 16:49:40 +1300 Subject: [PATCH 16/31] Fix for windows cross compilation --- compiler/ghc/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 9251d35747..f72a3b8a95 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -333,6 +333,11 @@ let # `-fexternal-dynamic-refs` causes `undefined reference` errors when building GHC cross compiler for windows + lib.optionalString (enableRelocatedStaticLibs && targetPlatform.isx86_64 && !targetPlatform.isWindows) " '*.*.ghc.*.opts += -fexternal-dynamic-refs'" + # With the latest nixpkgs mixing `struct utimbuf` and `struct _utimbuf` causes an error without this + + lib.optionalString (targetPlatform.isWindows) ( + if builtins.compareVersions ghc-version "9.10" >= 0 + then " '*.ghc-internal.ghc.*.opts += -optc-Wno-incompatible-pointer-types'" + else " '*.base.ghc.*.opts += -optc-Wno-incompatible-pointer-types'") # The fact that we need to set this here is pretty idiotic. GHC should figure this out on it's own. # Either have a runtime flag/setting to disable it or if dlopen fails, remember that it failed and # fall back to non-dynamic. We only have dynamic linker with musl if host and target arch match. From 44065a9e77360c406db7e14f05b35056375b965e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 19:58:35 +1300 Subject: [PATCH 17/31] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index b02d3a5545..0b185de784 100644 --- a/flake.nix +++ b/flake.nix @@ -84,7 +84,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 7dea0221628d0b1c0598c838adad1fc56783ee2d Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 22 Jan 2025 20:38:53 +1300 Subject: [PATCH 18/31] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 0b185de784..56311908fe 100644 --- a/flake.nix +++ b/flake.nix @@ -84,7 +84,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 6348d94055bf96c169b83da2a1ba7624fb77d8db Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 Jan 2025 16:18:36 +1300 Subject: [PATCH 19/31] Fix HsOpenSSL tests --- test/exe-dlls/default.nix | 1 + test/modules.nix | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 test/modules.nix diff --git a/test/exe-dlls/default.nix b/test/exe-dlls/default.nix index 7d9d304df4..6d7a7ba475 100644 --- a/test/exe-dlls/default.nix +++ b/test/exe-dlls/default.nix @@ -8,6 +8,7 @@ let inherit compiler-nix-name evalPackages; src = testSrc "exe-dlls"; cabalProjectLocal = builtins.readFile ../cabal.project.local; + modules = import ../modules.nix; }; packages = project.hsPkgs; diff --git a/test/modules.nix b/test/modules.nix new file mode 100644 index 0000000000..83b100fcfc --- /dev/null +++ b/test/modules.nix @@ -0,0 +1,4 @@ +[{ + # See https://github.com/haskell-cryptography/HsOpenSSL/issues/95 + packages.HsOpenSSL.ghcOptions = ["-optc=-Wno-incompatible-pointer-types"]; +}] From 2e6829580747a36044fc9ac975a85bd05194a09f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 Jan 2025 16:38:38 +1300 Subject: [PATCH 20/31] Fix HsOpenSSL tests --- test/th-dlls/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index e2d7bc93d1..f0745de652 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -8,7 +8,7 @@ let inherit compiler-nix-name evalPackages; src = testSrc "th-dlls"; cabalProjectLocal = builtins.readFile ../cabal.project.local; - modules = [({pkgs, ...}: lib.optionalAttrs externalInterpreter { + modules = import ../modules.nix ++ [({pkgs, ...}: lib.optionalAttrs externalInterpreter { packages.th-dlls.components.library.ghcOptions = [ "-fexternal-interpreter" ]; # Static openssl seems to fail to load in iserv for musl packages.HsOpenSSL.components.library.libs = lib.optional pkgs.stdenv.hostPlatform.isMusl (pkgs.openssl.override { static = false; }); From 9a3a276a0f4a353327276967d496a52b2247d087 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 Jan 2025 20:33:58 +1300 Subject: [PATCH 21/31] Fix HsOpenSSL tests --- test/exe-lib-dlls/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/test/exe-lib-dlls/default.nix b/test/exe-lib-dlls/default.nix index 466d07429a..d2a883ca11 100644 --- a/test/exe-lib-dlls/default.nix +++ b/test/exe-lib-dlls/default.nix @@ -8,6 +8,7 @@ let inherit compiler-nix-name evalPackages; src = testSrc "exe-lib-dlls"; cabalProjectLocal = builtins.readFile ../cabal.project.local; + modules = import ../modules.nix; }; packages = project.hsPkgs; From eea3e699d5bbd8b24d1fcf764b20e0186986d210 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 27 Jan 2025 15:19:20 +1100 Subject: [PATCH 22/31] Drop ghc 8.10 from ci --- ci.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/ci.nix b/ci.nix index e1a6cf29a1..364908bc3d 100644 --- a/ci.nix +++ b/ci.nix @@ -63,7 +63,6 @@ # 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 (nixpkgsName == "R2411") { - ghc810 = true; ghc92 = false; ghc94 = false; ghc96 = false; From 21158904507e1b02927096fa9a4cd859d2df2260 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 27 Jan 2025 15:44:55 +1100 Subject: [PATCH 23/31] Drop mingwW64 from ci --- ci.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ci.nix b/ci.nix index 364908bc3d..63ccd4fb83 100644 --- a/ci.nix +++ b/ci.nix @@ -89,11 +89,6 @@ || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc982" "ghc983" "ghc984"]) )) { inherit (lib.systems.examples) ghcjs; - } // lib.optionalAttrs ( - (__match ".*llvm" compiler-nix-name == null) - && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928"]) # Including GHC HEAD here because the patches for rts/RtsSymbols.c no longer apply and mingwW64 GHC build fails without them - || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity - inherit (lib.systems.examples) mingwW64; } // lib.optionalAttrs (nixpkgsName == "unstable" && (__match ".*llvm" compiler-nix-name == null) && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902" "ghc928" "ghc948"]) From 8e3f39eca2b01732722c1a1831a329c60cd24ed3 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 28 Jan 2025 10:14:18 +1100 Subject: [PATCH 24/31] Skip flaky test --- test/th-dlls/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index f0745de652..38366f462f 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -37,7 +37,7 @@ in recurseIntoAttrs { build-ei = packages-ei.th-dlls.components.library; just-template-haskell-ei = packages-ei.th-dlls.components.exes.just-template-haskell; } // optionalAttrs - (!(builtins.elem compiler-nix-name ["ghc984" "ghc9121" "ghc912120241215"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) { + (!(builtins.elem compiler-nix-name ["ghc984" "ghc9121" "ghc912120241215" "ghc91320241230"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) { # On for aarch64 cross compile on GHC this test is fails sometimes for non profiled builds # (and always for the profiled builds). # This may be related to the memory allocation changes made in 9.8.4 that From f1e545665ecd6ad32bc92a6c8d019836ba8f7469 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 29 Jan 2025 07:45:33 +1100 Subject: [PATCH 25/31] Add mingwW64 back into ci (but not GHC 9.6.6) --- ci.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci.nix b/ci.nix index 63ccd4fb83..85fe537518 100644 --- a/ci.nix +++ b/ci.nix @@ -89,6 +89,11 @@ || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc982" "ghc983" "ghc984"]) )) { inherit (lib.systems.examples) ghcjs; + } // lib.optionalAttrs ( + (__match ".*llvm" compiler-nix-name == null) + && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc966"]) # Not sure why GHC 9.6.6 TH code now wants `log1pf` + || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity + inherit (lib.systems.examples) mingwW64; } // lib.optionalAttrs (nixpkgsName == "unstable" && (__match ".*llvm" compiler-nix-name == null) && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902" "ghc928" "ghc948"]) From 59ba3327cb6eda3fe0b86f8affb47cf1264a25ce Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 29 Jan 2025 21:36:52 +1300 Subject: [PATCH 26/31] Drop GHC <9.6 from CI --- changelog.md | 9 ++++++++ ci.nix | 12 +++-------- docs/reference/supported-ghc-versions.md | 26 +++++++++++------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/changelog.md b/changelog.md index 8207314213..a480b58ec7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,15 @@ This file contains a summary of changes to Haskell.nix and `nix-tools` that will impact users. +## Jan 29, 2024 + +Removed GHC <9.6 from CI. + +The latest `nixpkgs-unstable` cause problems with + * GHC 8.10.7 + * GHC 9.6.6 mingwW64 (ucrt64 works still as does mingwW64 + with newer GHC versions) + ## Sep 17, 2024 Cabal projects now use the more granular Unit IDs from plan.json diff --git a/ci.nix b/ci.nix index 85fe537518..81c0f35d62 100644 --- a/ci.nix +++ b/ci.nix @@ -18,11 +18,6 @@ # short names for nixpkgs versions nixpkgsVersions = { - "R2205" = inputs.nixpkgs-2205; - "R2211" = inputs.nixpkgs-2211; - "R2305" = inputs.nixpkgs-2305; - "R2311" = inputs.nixpkgs-2311; - "R2405" = inputs.nixpkgs-2405; "R2411" = inputs.nixpkgs-2411; "unstable" = inputs.nixpkgs-unstable; }; @@ -63,10 +58,9 @@ # 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 (nixpkgsName == "R2411") { - ghc92 = false; - ghc94 = false; - ghc96 = false; - ghc98 = false; + # TODO perhaps these + # ghc96 = false; + # ghc98 = false; } // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") { ghc96 = true; ghc98 = true; diff --git a/docs/reference/supported-ghc-versions.md b/docs/reference/supported-ghc-versions.md index 38d0b5df0b..b6fa431b57 100644 --- a/docs/reference/supported-ghc-versions.md +++ b/docs/reference/supported-ghc-versions.md @@ -2,13 +2,14 @@ The following GHC versions are defined in `haskell.nix` (there is a derivation for each, though not all are cached or tested by CI): -- 8.4.4 -- 8.6.{1,2,3,4,5} -- 8.8.{1,2,3,4} -- 8.10.{1,2,3,4,5} -- 9.0.1 -- 9.2.1 -- 9.2.2 + +- 9.6.6 (TH is broken in mingwW64, but ucrt64 works) +- 9.8.4 +- 9.10.1 +- 9.12.1 + +8.10.7 may still work with older nixpkgs versions, but is broken for +nixpkgs-unstable. The following table shows the Nixpkgs/GHC versions which are built/cached, and which of those are further tested. If you use a combination of Nixpkgs version @@ -21,13 +22,10 @@ really should use an instance of Nixpkgs provided by `haskell.nix` itself. | Nixpkgs version | Nixpkgs pinning | GHC version | `compiler-nix-name` | Tested in CI? | |------------------|--------------------|-------------|-----------------------|---------------| -| 22.05 | `nixpkgs-2205` | 8.6.5 | `ghc865` | No | -| 22.05 | `nixpkgs-2205` | 8.10.7 | `ghc8107` | No | -| unstable | `nixpkgs-unstable` | 8.6.5 | `ghc865` | No | -| unstable | `nixpkgs-unstable` | 8.8.4 | `ghc884` | No | -| unstable | `nixpkgs-unstable` | 8.10.7 | `ghc8107` | Yes | -| unstable | `nixpkgs-unstable` | 9.0.2 | `ghc902` | No | -| unstable | `nixpkgs-unstable` | 9.2.4 | `ghc924` | Yes | +| unstable | `nixpkgs-unstable` | 9.6.6 | `ghc96` or `ghc966` | Yes | +| unstable | `nixpkgs-unstable` | 9.8.4 | `ghc98` or `ghc984` | Yes | +| unstable | `nixpkgs-unstable` | 9.10.1 | `ghc910` or `ghc9101` | Yes | +| unstable | `nixpkgs-unstable` | 9.12.1 | `ghc912` or `ghc9121` | Yes | See [ci.nix](https://github.com/input-output-hk/haskell.nix/blob/master/ci.nix) for the source of truth about what is built and tested (in the off chance this From ab45034df0ca2d480c23a69089dfc75e2fb834b1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 29 Jan 2025 21:54:57 +1300 Subject: [PATCH 27/31] Remove unused hydra input See #2308 --- flake.lock | 92 ------------------------------------------------------ flake.nix | 1 - 2 files changed, 93 deletions(-) diff --git a/flake.lock b/flake.lock index a283b36cf7..9cab74bd0f 100644 --- a/flake.lock +++ b/flake.lock @@ -319,28 +319,6 @@ "type": "github" } }, - "hydra": { - "inputs": { - "nix": "nix", - "nixpkgs": [ - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1671755331, - "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", - "owner": "NixOS", - "repo": "hydra", - "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, "iserv-proxy": { "flake": false, "locked": { @@ -358,59 +336,6 @@ "type": "github" } }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1661606874, - "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", - "owner": "NixOS", - "repo": "nix", - "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "2.11.0", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1657693803, - "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.05-small", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-2003": { "locked": { "lastModified": 1620055814, @@ -555,22 +480,6 @@ "type": "github" } }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { "lastModified": 1737110817, @@ -625,7 +534,6 @@ "hls-2.8": "hls-2.8", "hls-2.9": "hls-2.9", "hpc-coveralls": "hpc-coveralls", - "hydra": "hydra", "iserv-proxy": "iserv-proxy", "nixpkgs": [ "nixpkgs-unstable" diff --git a/flake.nix b/flake.nix index 56311908fe..4c91e4744b 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,6 @@ "hls-2.7" = { url = "github:haskell/haskell-language-server/2.7.0.0"; flake = false; }; "hls-2.8" = { url = "github:haskell/haskell-language-server/2.8.0.0"; flake = false; }; "hls-2.9" = { url = "github:haskell/haskell-language-server/2.9.0.1"; flake = false; }; - hydra.url = "hydra"; hackage = { url = "github:input-output-hk/hackage.nix"; flake = false; From 75c26bfcc82e0560e4d58cebc6e778b24fba4c85 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 31 Jan 2025 18:24:27 +1300 Subject: [PATCH 28/31] Use ghc 9.6.6 for github tests --- .github/workflows/pipeline.yml | 78 +++++++++++++++++----------------- test/tests.sh | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 282342b761..80458f2bba 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,4 +1,4 @@ -name: "Run tests with ghc8107" +name: "Run tests with ghc966" on: pull_request: @@ -22,120 +22,120 @@ jobs: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Running the nix-build tests..." - run: "./test/tests.sh ghc8107 nix-build" + - name: "Run tests with ghc966: Running the nix-build tests..." + run: "./test/tests.sh ghc966 nix-build" unit-tests: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Running the unit tests..." - run: "./test/tests.sh ghc8107 unit-tests" + - name: "Run tests with ghc966: Running the unit tests..." + run: "./test/tests.sh ghc966 unit-tests" runghc: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking that a nix-shell works for runghc..." - run: "./test/tests.sh ghc8107 runghc" + - name: "Run tests with ghc966: Checking that a nix-shell works for runghc..." + run: "./test/tests.sh ghc966 runghc" cabal: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking that a nix-shell works for cabal..." - run: "./test/tests.sh ghc8107 cabal" + - name: "Run tests with ghc966: Checking that a nix-shell works for cabal..." + run: "./test/tests.sh ghc966 cabal" cabal-doExactConfig: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking that a nix-shell works for cabal (doExactConfig component)..." - run: "./test/tests.sh ghc8107 cabal-doExactConfig" + - name: "Run tests with ghc966: Checking that a nix-shell works for cabal (doExactConfig component)..." + run: "./test/tests.sh ghc966 cabal-doExactConfig" tests-benchmarks: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks..." - run: "./test/tests.sh ghc8107 tests-benchmarks" + - name: "Run tests with ghc966: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks..." + run: "./test/tests.sh ghc966 tests-benchmarks" multi-target: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking that a nix-shell works for a multi-target project..." - run: "./test/tests.sh ghc8107 multi-target" + - name: "Run tests with ghc966: Checking that a nix-shell works for a multi-target project..." + run: "./test/tests.sh ghc966 multi-target" shellFor-single-package: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking shellFor works for a cabal project, multiple packages..." - run: "./test/tests.sh ghc8107 shellFor-single-package" + - name: "Run tests with ghc966: Checking shellFor works for a cabal project, multiple packages..." + run: "./test/tests.sh ghc966 shellFor-single-package" shellFor-multiple-package: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package...y" - run: "./test/tests.sh ghc8107 shellFor-multiple-package" + - name: "Run tests with ghc966: Checking shellFor works for a cabal project, single package...y" + run: "./test/tests.sh ghc966 shellFor-multiple-package" shellFor-hoogle: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package..." - run: "./test/tests.sh ghc8107 shellFor-hoogle" + - name: "Run tests with ghc966: Checking shellFor works for a cabal project, single package..." + run: "./test/tests.sh ghc966 shellFor-hoogle" shellFor-not-depends: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking shellFor does not depend on given packages...y" - run: "./test/tests.sh ghc8107 shellFor-not-depends" + - name: "Run tests with ghc966: Checking shellFor does not depend on given packages...y" + run: "./test/tests.sh ghc966 shellFor-not-depends" maintainer-scripts: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking the maintainer scripts...y" - run: "./test/tests.sh ghc8107 maintainer-scripts" + - name: "Run tests with ghc966: Checking the maintainer scripts...y" + run: "./test/tests.sh ghc966 maintainer-scripts" plan-extra-hackages: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking that plan construction works with extra Hackages..." - run: "./test/tests.sh ghc8107 plan-extra-hackages" + - name: "Run tests with ghc966: Checking that plan construction works with extra Hackages..." + run: "./test/tests.sh ghc966 plan-extra-hackages" build-extra-hackages: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: Checking that package with extra Hackages can be build..." - run: "./test/tests.sh ghc8107 build-extra-hackages" + - name: "Run tests with ghc966: Checking that package with extra Hackages can be build..." + run: "./test/tests.sh ghc966 build-extra-hackages" hix: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..." - run: "./test/tests.sh ghc8107 hix" + - name: "Run tests with ghc966: End-2-end test of hix project initialization and flakes development shell ..." + run: "./test/tests.sh ghc966 hix" # template: # runs-on: [self-hosted, linux] # steps: # - uses: actions/checkout@v4 -# - name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..." -# run: "./test/tests.sh ghc8107 template" +# - name: "Run tests with ghc966: End-2-end test of hix project initialization and flakes development shell ..." +# run: "./test/tests.sh ghc966 template" docs: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - name: "Test examples in documentation ..." - run: "./test/tests.sh ghc8107 docs" + run: "./test/tests.sh ghc966 docs" hydra-ifdLevel-0-and-1: runs-on: [self-hosted, linux] @@ -178,9 +178,9 @@ jobs: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - - name: "Check closure size with ghc8107" + - name: "Check closure size with ghc966" run: | - nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8107 -o check-closure-size.sh + nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc966 -o check-closure-size.sh echo "+++ Closure size (MB)" ./check-closure-size.sh @@ -208,7 +208,7 @@ jobs: - uses: actions/checkout@v4 - name: "Make sure non store paths like can be used as src" run: | - nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8107 -o check-path-support.sh + nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc966 -o check-path-support.sh ./check-path-support.sh haskell-nix-roots-do-not-require-IFDs: @@ -218,12 +218,12 @@ jobs: - name: "Check that the haskell.nix roots do not require IFDs" run: nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false - hydra-without-remote-builders-ghc8107: + hydra-without-remote-builders-ghc966: runs-on: [self-hosted, linux] steps: - uses: actions/checkout@v4 - name: "Check that evaluation of hydra jobs works without using remote builders for GHC 8.10.7" - run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc8107-native --show-trace --builders '' + run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc966-native --show-trace --builders '' hydra-without-remote-builders-ghc9101: runs-on: [self-hosted, linux] diff --git a/test/tests.sh b/test/tests.sh index 41480f0575..4e1fe99600 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -107,7 +107,7 @@ fi # These tests still use manually generated `pkgs`. They were left that way # so that we would still be testing that workflow. -SHELL_FOR_GHC="ghc8107" +SHELL_FOR_GHC="ghc966" if [ "$TESTS" == "shellFor-single-package" ] || [ "$TESTS" == "all" ]; then printf "*** Checking shellFor works for a cabal project, multiple packages...\n" >& 2 nix-shell $NIX_BUILD_ARGS \ From 4f2a27e650165a4138854767561a5e605f249c8e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 3 Feb 2025 11:20:17 +1300 Subject: [PATCH 29/31] Use nixpkgs-unstable directly (instead of via `follows`) in default.nix --- default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.nix b/default.nix index f0898b6bc0..ade481f5cb 100644 --- a/default.nix +++ b/default.nix @@ -27,7 +27,7 @@ let # # Manually fetch nixpkgs nixpkgs = - with lock.nodes.nixpkgs.locked; + with lock.nodes.nixpkgs-unstable.locked; builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; sha256 = narHash; From e3a18a4328f81a5992113bd9e1509701b7968cea Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 3 Feb 2025 11:45:45 +1300 Subject: [PATCH 30/31] Update shell-for test to use IFD --- test/shell-for/.plan.nix/pkga.nix | 42 ----- test/shell-for/.plan.nix/pkgb.nix | 63 ------- test/shell-for/default.nix | 40 ++--- test/shell-for/pkgs.nix | 282 ------------------------------ 4 files changed, 17 insertions(+), 410 deletions(-) delete mode 100644 test/shell-for/.plan.nix/pkga.nix delete mode 100644 test/shell-for/.plan.nix/pkgb.nix delete mode 100644 test/shell-for/pkgs.nix diff --git a/test/shell-for/.plan.nix/pkga.nix b/test/shell-for/.plan.nix/pkga.nix deleted file mode 100644 index 3f42602d8e..0000000000 --- a/test/shell-for/.plan.nix/pkga.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ system - , compiler - , flags - , pkgs - , hsPkgs - , pkgconfPkgs - , errorHandler - , config - , ... }: - { - flags = {}; - package = { - specVersion = "2.2"; - identifier = { name = "pkga"; version = "0.1.0.0"; }; - license = "LicenseRef-PublicDomain"; - copyright = ""; - maintainer = "rodney.lorrimar@iohk.io"; - author = "Rodney Lorrimar"; - homepage = ""; - url = ""; - synopsis = ""; - description = ""; - buildType = "Simple"; - isLocal = true; - }; - components = { - "library" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."lens" or (errorHandler.buildDepError "lens")) - (hsPkgs."text" or (errorHandler.buildDepError "text")) - ]; - buildable = true; - }; - exes = { - "pkga-exe" = { - depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; - buildable = true; - }; - }; - }; - } // rec { src = (pkgs.lib).mkDefault ../pkga; } \ No newline at end of file diff --git a/test/shell-for/.plan.nix/pkgb.nix b/test/shell-for/.plan.nix/pkgb.nix deleted file mode 100644 index 55431466fa..0000000000 --- a/test/shell-for/.plan.nix/pkgb.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ system - , compiler - , flags - , pkgs - , hsPkgs - , pkgconfPkgs - , errorHandler - , config - , ... }: - { - flags = {}; - package = { - specVersion = "2.2"; - identifier = { name = "pkgb"; version = "0.1.0.0"; }; - license = "LicenseRef-PublicDomain"; - copyright = ""; - maintainer = "rodney.lorrimar@iohk.io"; - author = "Rodney Lorrimar"; - homepage = ""; - url = ""; - synopsis = ""; - description = ""; - buildType = "Simple"; - isLocal = true; - }; - components = { - "library" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."pkga" or (errorHandler.buildDepError "pkga")) - (hsPkgs."conduit" or (errorHandler.buildDepError "conduit")) - (hsPkgs."conduit-extra" or (errorHandler.buildDepError "conduit-extra")) - (hsPkgs."directory" or (errorHandler.buildDepError "directory")) - (hsPkgs."resourcet" or (errorHandler.buildDepError "resourcet")) - ]; - buildable = true; - }; - exes = { - "pkgb" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."pkgb" or (errorHandler.buildDepError "pkgb")) - (hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative")) - (hsPkgs."text" or (errorHandler.buildDepError "text")) - ]; - buildable = true; - }; - }; - tests = { - "tests" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."pkgb" or (errorHandler.buildDepError "pkgb")) - (hsPkgs."process" or (errorHandler.buildDepError "process")) - ]; - build-tools = [ - (hsPkgs.buildPackages.pkga.components.exes.pkga-exe or (pkgs.buildPackages.pkga-exe or (errorHandler.buildToolDepError "pkga:pkga-exe"))) - ]; - buildable = true; - }; - }; - }; - } // rec { src = (pkgs.lib).mkDefault ../pkgb; } \ No newline at end of file diff --git a/test/shell-for/default.nix b/test/shell-for/default.nix index 18f5310110..2af78a5669 100644 --- a/test/shell-for/default.nix +++ b/test/shell-for/default.nix @@ -1,34 +1,27 @@ -{ stdenv, lib, haskellLib, cabal-install, mkCabalProjectPkgSet, recurseIntoAttrs, runCommand, testSrc, compiler-nix-name, evalPackages }: +{ stdenv, lib, haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name, evalPackages }: with lib; let - pkgSet = mkCabalProjectPkgSet { - plan-pkgs = import ./pkgs.nix; - pkg-def-extras = [{ - pkga = ./.plan.nix/pkga.nix; - pkgb = ./.plan.nix/pkgb.nix; - }]; - modules = [{ - inherit evalPackages; - }]; + project = project' { + inherit compiler-nix-name evalPackages; + src = testSrc "shell-for"; + cabalProjectLocal = builtins.readFile ../cabal.project.local; + modules = [{ inherit evalPackages; }]; }; - env = pkgSet.config.hsPkgs.shellFor { - # Shell will provide the dependencies of pkga and pkgb, but not - # pkga and pkgb themselves. + packages = project.hsPkgs; + + env = project.shellFor { packages = ps: with ps; [ pkga pkgb ]; - # This adds cabal-install to the shell, which helps tests because - # they use a nix-shell --pure. Normally you would BYO cabal-install. tools = { cabal.cabalProjectLocal = builtins.readFile ../cabal.project.local; }; exactDeps = true; - # Avoid duplicate package issues when runghc looks for packages packageSetupDeps = false; }; - envPkga = pkgSet.config.hsPkgs.shellFor { + envPkga = project.shellFor { # Shell will provide the dependencies of pkga packages = ps: with ps; [ pkga ]; # This adds cabal-install to the shell, which helps tests because @@ -41,7 +34,7 @@ let packageSetupDeps = false; }; - envDefault = pkgSet.config.hsPkgs.shellFor { + envDefault = project.shellFor { # The default implementation of packages should use isLocal and the # result should be the same as: # packages = ps: with ps; [ pkga pkgb ]; @@ -57,8 +50,10 @@ let in recurseIntoAttrs { # Does not work on ghcjs because it needs zlib. # Does not work on windows because it needs mintty. - meta.disabled = stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isGhcjs || stdenv.hostPlatform.isWindows || (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) - || compiler-nix-name != ((import ./pkgs.nix).pkgs null).compiler.nix-name; + meta.disabled = stdenv.hostPlatform.isMusl + || stdenv.hostPlatform.isGhcjs + || stdenv.hostPlatform.isWindows + || (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64); inherit env envPkga envDefault; run = stdenv.mkDerivation { name = "shell-for-test"; @@ -67,7 +62,7 @@ in recurseIntoAttrs { ######################################################################## # test shell-for with an example program - cp ${./pkgb/src}/*.hs . + cp ${testSrc "shell-for" + "/pkgb/src"}/*.hs . printf "checking that the shell env has the dependencies...\n" >& 2 ${env.ghc}/bin/${env.ghc.targetPrefix}runghc conduit-test.hs @@ -83,8 +78,7 @@ in recurseIntoAttrs { }; passthru = { - # Used for debugging with nix repl - inherit pkgSet; + inherit project packages; # Used for testing externally with nix-shell (../tests.sh). inherit env envPkga envDefault; diff --git a/test/shell-for/pkgs.nix b/test/shell-for/pkgs.nix deleted file mode 100644 index c89a6253bf..0000000000 --- a/test/shell-for/pkgs.nix +++ /dev/null @@ -1,282 +0,0 @@ -{ - pkgs = hackage: - { - packages = { - "these".revision = (((hackage."these")."1.1.1.1").revisions).default; - "these".flags.assoc = true; - "binary".revision = (((hackage."binary")."0.8.8.0").revisions).default; - "streaming-commons".revision = (((hackage."streaming-commons")."0.2.2.1").revisions).default; - "streaming-commons".flags.use-bytestring-builder = false; - "bifunctors".revision = (((hackage."bifunctors")."5.5.11").revisions).default; - "bifunctors".flags.tagged = true; - "bifunctors".flags.semigroups = true; - "ghc-prim".revision = (((hackage."ghc-prim")."0.6.1").revisions).default; - "void".revision = (((hackage."void")."0.7.3").revisions).default; - "void".flags.safe = false; - "ansi-terminal".revision = (((hackage."ansi-terminal")."0.11").revisions).default; - "ansi-terminal".flags.example = false; - "unliftio-core".revision = (((hackage."unliftio-core")."0.2.0.1").revisions).default; - "free".revision = (((hackage."free")."5.1.7").revisions).default; - "exceptions".revision = (((hackage."exceptions")."0.10.4").revisions).default; - "array".revision = (((hackage."array")."0.5.4.0").revisions).default; - "integer-gmp".revision = (((hackage."integer-gmp")."1.0.3.0").revisions).default; - "mono-traversable".revision = (((hackage."mono-traversable")."1.0.15.1").revisions).default; - "conduit-extra".revision = (((hackage."conduit-extra")."1.3.5").revisions).default; - "call-stack".revision = (((hackage."call-stack")."0.4.0").revisions).default; - "template-haskell".revision = (((hackage."template-haskell")."2.16.0.0").revisions).default; - "hsc2hs".revision = (((hackage."hsc2hs")."0.68.7").revisions).default; - "hsc2hs".flags.in-ghc-tree = false; - "vector".revision = (((hackage."vector")."0.12.3.0").revisions).default; - "vector".flags.unsafechecks = false; - "vector".flags.internalchecks = false; - "vector".flags.boundschecks = true; - "vector".flags.wall = false; - "conduit".revision = (((hackage."conduit")."1.3.4.1").revisions).default; - "network".revision = (((hackage."network")."3.1.2.2").revisions).default; - "network".flags.devel = false; - "pretty".revision = (((hackage."pretty")."1.1.3.6").revisions).default; - "async".revision = (((hackage."async")."2.2.3").revisions).default; - "async".flags.bench = false; - "process".revision = (((hackage."process")."1.6.13.2").revisions).default; - "random".revision = (((hackage."random")."1.2.0").revisions).default; - "optparse-applicative".revision = (((hackage."optparse-applicative")."0.16.1.0").revisions).default; - "optparse-applicative".flags.process = true; - "parallel".revision = (((hackage."parallel")."3.2.2.0").revisions).default; - "scientific".revision = (((hackage."scientific")."0.3.7.0").revisions).default; - "scientific".flags.integer-simple = false; - "scientific".flags.bytestring-builder = false; - "distributive".revision = (((hackage."distributive")."0.6.2.1").revisions).default; - "distributive".flags.tagged = true; - "distributive".flags.semigroups = true; - "transformers-base".revision = (((hackage."transformers-base")."0.4.6").revisions).default; - "transformers-base".flags.orphaninstances = true; - "vector-algorithms".revision = (((hackage."vector-algorithms")."0.8.0.4").revisions).default; - "vector-algorithms".flags.unsafechecks = false; - "vector-algorithms".flags.llvm = false; - "vector-algorithms".flags.internalchecks = false; - "vector-algorithms".flags.bench = true; - "vector-algorithms".flags.boundschecks = true; - "vector-algorithms".flags.properties = true; - "base".revision = (((hackage."base")."4.14.3.0").revisions).default; - "rts".revision = (((hackage."rts")."1.0.1").revisions).default; - "text".revision = (((hackage."text")."1.2.4.1").revisions).default; - "mtl".revision = (((hackage."mtl")."2.2.2").revisions).default; - "time".revision = (((hackage."time")."1.9.3").revisions).default; - "unordered-containers".revision = (((hackage."unordered-containers")."0.2.14.0").revisions).default; - "unordered-containers".flags.debug = false; - "unix".revision = (((hackage."unix")."2.7.2.2").revisions).default; - "typed-process".revision = (((hackage."typed-process")."0.2.6.1").revisions).default; - "contravariant".revision = (((hackage."contravariant")."1.5.5").revisions).default; - "contravariant".flags.tagged = true; - "contravariant".flags.semigroups = true; - "contravariant".flags.statevar = true; - "bytestring".revision = (((hackage."bytestring")."0.10.12.0").revisions).default; - "ansi-wl-pprint".revision = (((hackage."ansi-wl-pprint")."0.6.9").revisions).default; - "ansi-wl-pprint".flags.example = false; - "reflection".revision = (((hackage."reflection")."2.1.6").revisions).default; - "reflection".flags.slow = false; - "reflection".flags.template-haskell = true; - "integer-logarithms".revision = (((hackage."integer-logarithms")."1.0.3.1").revisions).default; - "integer-logarithms".flags.check-bounds = false; - "integer-logarithms".flags.integer-gmp = true; - "lens".revision = (((hackage."lens")."5.0.1").revisions).default; - "lens".flags.test-templates = true; - "lens".flags.test-hunit = true; - "lens".flags.benchmark-uniplate = false; - "lens".flags.inlining = true; - "lens".flags.trustworthy = true; - "lens".flags.test-properties = true; - "lens".flags.dump-splices = false; - "lens".flags.j = false; - "containers".revision = (((hackage."containers")."0.6.5.1").revisions).default; - "semigroupoids".revision = (((hackage."semigroupoids")."5.3.5").revisions).default; - "semigroupoids".flags.distributive = true; - "semigroupoids".flags.comonad = true; - "semigroupoids".flags.contravariant = true; - "semigroupoids".flags.containers = true; - "semigroupoids".flags.tagged = true; - "semigroupoids".flags.unordered-containers = true; - "tagged".revision = (((hackage."tagged")."0.8.6.1").revisions).default; - "tagged".flags.deepseq = true; - "tagged".flags.transformers = true; - "base-orphans".revision = (((hackage."base-orphans")."0.8.5").revisions).default; - "primitive".revision = (((hackage."primitive")."0.7.2.0").revisions).default; - "directory".revision = (((hackage."directory")."1.3.6.0").revisions).default; - "transformers-compat".revision = (((hackage."transformers-compat")."0.7").revisions).default; - "transformers-compat".flags.two = false; - "transformers-compat".flags.five = false; - "transformers-compat".flags.four = false; - "transformers-compat".flags.generic-deriving = true; - "transformers-compat".flags.five-three = true; - "transformers-compat".flags.three = false; - "transformers-compat".flags.mtl = true; - "profunctors".revision = (((hackage."profunctors")."5.6.2").revisions).default; - "th-abstraction".revision = (((hackage."th-abstraction")."0.4.3.0").revisions).default; - "resourcet".revision = (((hackage."resourcet")."1.2.4.3").revisions).default; - "semigroups".revision = (((hackage."semigroups")."0.19.2").revisions).default; - "semigroups".flags.bytestring = true; - "semigroups".flags.deepseq = true; - "semigroups".flags.binary = true; - "semigroups".flags.containers = true; - "semigroups".flags.tagged = true; - "semigroups".flags.template-haskell = true; - "semigroups".flags.bytestring-builder = false; - "semigroups".flags.transformers = true; - "semigroups".flags.hashable = true; - "semigroups".flags.unordered-containers = true; - "semigroups".flags.text = true; - "ghc-boot-th".revision = (((hackage."ghc-boot-th")."8.10.7").revisions).default; - "splitmix".revision = (((hackage."splitmix")."0.1.0.3").revisions).default; - "splitmix".flags.optimised-mixer = false; - "filepath".revision = (((hackage."filepath")."1.4.2.1").revisions).default; - "deepseq".revision = (((hackage."deepseq")."1.4.4.0").revisions).default; - "kan-extensions".revision = (((hackage."kan-extensions")."5.2.3").revisions).default; - "strict".revision = (((hackage."strict")."0.4.0.1").revisions).default; - "strict".flags.assoc = true; - "attoparsec".revision = (((hackage."attoparsec")."0.14.1").revisions).default; - "attoparsec".flags.developer = false; - "transformers".revision = (((hackage."transformers")."0.5.6.2").revisions).default; - "colour".revision = (((hackage."colour")."2.3.6").revisions).default; - "invariant".revision = (((hackage."invariant")."0.5.4").revisions).default; - "hashable".revision = (((hackage."hashable")."1.3.3.0").revisions).default; - "hashable".flags.integer-gmp = true; - "hashable".flags.random-initial-seed = false; - "adjunctions".revision = (((hackage."adjunctions")."4.4").revisions).default; - "comonad".revision = (((hackage."comonad")."5.0.8").revisions).default; - "comonad".flags.distributive = true; - "comonad".flags.indexed-traversable = true; - "comonad".flags.containers = true; - "assoc".revision = (((hackage."assoc")."1.0.2").revisions).default; - "indexed-traversable".revision = (((hackage."indexed-traversable")."0.1.1").revisions).default; - "zlib".revision = (((hackage."zlib")."0.6.2.3").revisions).default; - "zlib".flags.non-blocking-ffi = false; - "zlib".flags.bundled-c-zlib = false; - "zlib".flags.pkg-config = false; - "indexed-traversable-instances".revision = (((hackage."indexed-traversable-instances")."0.1").revisions).default; - "split".revision = (((hackage."split")."0.2.3.4").revisions).default; - "StateVar".revision = (((hackage."StateVar")."1.2.2").revisions).default; - "stm".revision = (((hackage."stm")."2.5.0.1").revisions).default; - }; - compiler = { - version = "8.10.7"; - nix-name = "ghc8107"; - packages = { - "binary" = "0.8.8.0"; - "ghc-prim" = "0.6.1"; - "exceptions" = "0.10.4"; - "array" = "0.5.4.0"; - "integer-gmp" = "1.0.3.0"; - "template-haskell" = "2.16.0.0"; - "pretty" = "1.1.3.6"; - "process" = "1.6.13.2"; - "base" = "4.14.3.0"; - "rts" = "1.0.1"; - "text" = "1.2.4.1"; - "mtl" = "2.2.2"; - "time" = "1.9.3"; - "unix" = "2.7.2.2"; - "bytestring" = "0.10.12.0"; - "containers" = "0.6.5.1"; - "directory" = "1.3.6.0"; - "ghc-boot-th" = "8.10.7"; - "filepath" = "1.4.2.1"; - "deepseq" = "1.4.4.0"; - "transformers" = "0.5.6.2"; - "stm" = "2.5.0.1"; - }; - }; - }; - extras = _hackage: - { - packages = { pkgb = ./.plan.nix/pkgb.nix; pkga = ./.plan.nix/pkga.nix; }; - }; - modules = [ - ({ lib, ... }: - { packages = { "pkgb" = { flags = {}; }; "pkga" = { flags = {}; }; }; }) - ({ lib, ... }: - { - packages = { - "tagged".components.library.planned = lib.mkOverride 900 true; - "containers".components.library.planned = lib.mkOverride 900 true; - "lens".components.library.planned = lib.mkOverride 900 true; - "semigroupoids".components.library.planned = lib.mkOverride 900 true; - "bifunctors".components.library.planned = lib.mkOverride 900 true; - "streaming-commons".components.library.planned = lib.mkOverride 900 true; - "binary".components.library.planned = lib.mkOverride 900 true; - "these".components.library.planned = lib.mkOverride 900 true; - "ghc-prim".components.library.planned = lib.mkOverride 900 true; - "StateVar".components.library.planned = lib.mkOverride 900 true; - "stm".components.library.planned = lib.mkOverride 900 true; - "split".components.library.planned = lib.mkOverride 900 true; - "hsc2hs".components.exes."hsc2hs".planned = lib.mkOverride 900 true; - "indexed-traversable-instances".components.library.planned = lib.mkOverride 900 true; - "indexed-traversable".components.library.planned = lib.mkOverride 900 true; - "assoc".components.library.planned = lib.mkOverride 900 true; - "zlib".components.library.planned = lib.mkOverride 900 true; - "comonad".components.library.planned = lib.mkOverride 900 true; - "pkga".components.library.planned = lib.mkOverride 900 true; - "adjunctions".components.library.planned = lib.mkOverride 900 true; - "hashable".components.library.planned = lib.mkOverride 900 true; - "attoparsec".components.library.planned = lib.mkOverride 900 true; - "colour".components.library.planned = lib.mkOverride 900 true; - "transformers".components.library.planned = lib.mkOverride 900 true; - "invariant".components.library.planned = lib.mkOverride 900 true; - "parallel".components.library.planned = lib.mkOverride 900 true; - "optparse-applicative".components.library.planned = lib.mkOverride 900 true; - "random".components.library.planned = lib.mkOverride 900 true; - "process".components.library.planned = lib.mkOverride 900 true; - "scientific".components.library.planned = lib.mkOverride 900 true; - "async".components.library.planned = lib.mkOverride 900 true; - "conduit".components.library.planned = lib.mkOverride 900 true; - "network".components.library.planned = lib.mkOverride 900 true; - "pkgb".components.library.planned = lib.mkOverride 900 true; - "pretty".components.library.planned = lib.mkOverride 900 true; - "vector".components.library.planned = lib.mkOverride 900 true; - "template-haskell".components.library.planned = lib.mkOverride 900 true; - "mono-traversable".components.library.planned = lib.mkOverride 900 true; - "integer-gmp".components.library.planned = lib.mkOverride 900 true; - "call-stack".components.library.planned = lib.mkOverride 900 true; - "array".components.library.planned = lib.mkOverride 900 true; - "conduit-extra".components.library.planned = lib.mkOverride 900 true; - "ansi-terminal".components.library.planned = lib.mkOverride 900 true; - "free".components.library.planned = lib.mkOverride 900 true; - "unliftio-core".components.library.planned = lib.mkOverride 900 true; - "exceptions".components.library.planned = lib.mkOverride 900 true; - "void".components.library.planned = lib.mkOverride 900 true; - "integer-logarithms".components.library.planned = lib.mkOverride 900 true; - "ansi-wl-pprint".components.library.planned = lib.mkOverride 900 true; - "reflection".components.library.planned = lib.mkOverride 900 true; - "pkga".components.exes."pkga-exe".planned = lib.mkOverride 900 true; - "bytestring".components.library.planned = lib.mkOverride 900 true; - "pkgb".components.tests."tests".planned = lib.mkOverride 900 true; - "pkgb".components.exes."pkgb".planned = lib.mkOverride 900 true; - "contravariant".components.library.planned = lib.mkOverride 900 true; - "typed-process".components.library.planned = lib.mkOverride 900 true; - "unix".components.library.planned = lib.mkOverride 900 true; - "text".components.library.planned = lib.mkOverride 900 true; - "base".components.library.planned = lib.mkOverride 900 true; - "rts".components.library.planned = lib.mkOverride 900 true; - "unordered-containers".components.library.planned = lib.mkOverride 900 true; - "mtl".components.library.planned = lib.mkOverride 900 true; - "time".components.library.planned = lib.mkOverride 900 true; - "transformers-base".components.library.planned = lib.mkOverride 900 true; - "distributive".components.library.planned = lib.mkOverride 900 true; - "vector-algorithms".components.library.planned = lib.mkOverride 900 true; - "deepseq".components.library.planned = lib.mkOverride 900 true; - "filepath".components.library.planned = lib.mkOverride 900 true; - "kan-extensions".components.library.planned = lib.mkOverride 900 true; - "strict".components.library.planned = lib.mkOverride 900 true; - "splitmix".components.library.planned = lib.mkOverride 900 true; - "semigroups".components.library.planned = lib.mkOverride 900 true; - "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; - "resourcet".components.library.planned = lib.mkOverride 900 true; - "profunctors".components.library.planned = lib.mkOverride 900 true; - "base-orphans".components.library.planned = lib.mkOverride 900 true; - "directory".components.library.planned = lib.mkOverride 900 true; - "th-abstraction".components.library.planned = lib.mkOverride 900 true; - "primitive".components.library.planned = lib.mkOverride 900 true; - "transformers-compat".components.library.planned = lib.mkOverride 900 true; - }; - }) - ]; - } \ No newline at end of file From 198a7a2cf1b1b3c72e39fafddc7393ecbedb8269 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 3 Feb 2025 11:48:13 +1300 Subject: [PATCH 31/31] Update shell-for test to use IFD --- test/shell-for/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/shell-for/default.nix b/test/shell-for/default.nix index 2af78a5669..6e3674e41d 100644 --- a/test/shell-for/default.nix +++ b/test/shell-for/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name, evalPackages }: +{ stdenv, lib, haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name, evalPackages, project' }: with lib;