diff --git a/ci.nix b/ci.nix index 267ed37ca8..e4a775af81 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 3 +{ ifdLevel # This is passed in from flake.nix , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" diff --git a/flake.nix b/flake.nix index c1b1d657fa..3efa8bb545 100644 --- a/flake.nix +++ b/flake.nix @@ -97,6 +97,7 @@ let callFlake = import flake-compat; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; @@ -208,7 +209,7 @@ stripAttrsForHydra (filterDerivations ( # This is awkward. import ./ci.nix { - inherit system; + inherit ifdLevel system; haskellNix = self; }))); @@ -250,7 +251,9 @@ }; in cf.defaultNix.hydraJobs; in - self.allJobs.${system} // { nix-tools = nix-tools-hydraJobs.${system} or {}; } + self.allJobs.${system} + // lib.optionalAttrs (ifdLevel > 2) + { nix-tools = nix-tools-hydraJobs.${system} or {}; } ); devShells = forEachSystemPkgs (pkgs: @@ -284,7 +287,7 @@ "ghc921" "ghc922" "ghc923"]) ); }; in with (import nixpkgs { system = "x86_64-linux"; }); - traceHydraJobs (lib.recursiveUpdate flake { + traceHydraJobs (lib.recursiveUpdate flake (lib.optionalAttrs (ifdLevel > 2) { hydraJobs.nix-tools = pkgs.releaseTools.aggregate { name = "nix-tools"; constituents = [ @@ -299,7 +302,7 @@ (writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000")) ]; }; - }); + })); # --- Flake Local Nix Configuration ---------------------------- nixConfig = { diff --git a/nix-tools-static.nix b/nix-tools-static.nix index 783d7b6fc6..eadccddd78 100644 --- a/nix-tools-static.nix +++ b/nix-tools-static.nix @@ -1,22 +1,22 @@ -pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.1.7/"; in { +pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.1.8/"; in { aarch64-darwin = pkgs.fetchurl { name = "aarch64-darwin-nix-tools-static"; url = "${baseurl}aarch64-darwin-nix-tools-static.zip"; - sha256 = "sha256-f8XbWzHV+yriUvPCxEOt7CuVN5pfE4rbz37OPRG8j7U="; + sha256 = "sha256-du+QOnEkjVQFHiwHr7NGOku/fmvBUCFYRPipzU/MRPc="; }; x86_64-darwin = pkgs.fetchurl { name = "x86_64-darwin-nix-tools-static"; url = "${baseurl}x86_64-darwin-nix-tools-static.zip"; - sha256 = "sha256-kLy9lqJKaISgnfkyiQf7uupRImt3vR/szwXxR+rmDic="; + sha256 = "sha256-I55Mn6iKYxy3uoQp3DyhuJOvUJ+mDP9In9DyuEaw6K4="; }; aarch64-linux = pkgs.fetchurl { name = "aarch64-linux-nix-tools-static"; url = "${baseurl}aarch64-linux-nix-tools-static.zip"; - sha256 = "sha256-GBq5/JsZamuUZLIXEWxVk5Xnj6eZeQU6vX7ceAcBmAM="; + sha256 = "sha256-kx06o5tzow6PCdkV+mlQW4TQHdkEZGtSvH4sij5ZaYk="; }; x86_64-linux = pkgs.fetchurl { name = "x86_64-linux-nix-tools-static"; url = "${baseurl}x86_64-linux-nix-tools-static.zip"; - sha256 = "sha256-+tFokn7TNptt2BkROc6QVy2KgWNmPzPVv4tUCm/E7vI="; + sha256 = "sha256-02mBvbW5WT+0fY9n2RIbrNnMwpJIHZ5obgmFXDTz8Ds="; }; } diff --git a/nix-tools/cabal.project b/nix-tools/cabal.project index 9a4777ccaa..4c5b85330a 100644 --- a/nix-tools/cabal.project +++ b/nix-tools/cabal.project @@ -1,13 +1,11 @@ index-state: 2024-03-28T00:00:00Z -with-compiler: ghc-9.2.8 - packages: nix-tools -- haskell.nix expects nix-tools to provide the cabal and hpack executables -- so we put these two packages here, so they will be present even if nix-tools -- dependencies change -extra-packages: cabal-install, hpack +extra-packages: cabal-install, hpack, Cabal-syntax-json test-show-details: direct @@ -29,3 +27,9 @@ source-repository-package location: https://github.com/michaelpj/hackage-db.git tag: f3b9240212b036391871e4ea09891e91efcea7a1 --sha256: sha256-n0ATmkwtR68E2FuZK3QIQgZirVmWbd21vIQmzhGKsRw= + +source-repository-package + type: git + location: https://github.com/andreabedini/Cabal-syntax-json.git + tag: bf97be0038489239a11c61653b55afc77356ac1e + --sha256: sha256-i9TEqQqRqFM07q1Lr6wcMlURhBkhkVxHhP1jQjSE+Yg= diff --git a/nix-tools/flake.lock b/nix-tools/flake.lock index 00f2c559f1..610b435f13 100644 --- a/nix-tools/flake.lock +++ b/nix-tools/flake.lock @@ -120,11 +120,11 @@ "ghc910X": { "flake": false, "locked": { - "lastModified": 1709693152, - "narHash": "sha256-j7K/oZLy1ZZIpOsjq101IF7cz/i/UxY1ofIeNUfuuXc=", + "lastModified": 1711543129, + "narHash": "sha256-MUI07CxYOng7ZwHnMCw0ugY3HmWo2p/f4r07CGV7OAM=", "ref": "ghc-9.10", - "rev": "21e3f3250e88640087a1a60bee2cc113bf04509f", - "revCount": 62524, + "rev": "6ecd5f2ff97af53c7334f2d8581651203a2c6b7d", + "revCount": 62607, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -139,11 +139,11 @@ "ghc911": { "flake": false, "locked": { - "lastModified": 1710286031, - "narHash": "sha256-fz71zsU/ZukFMUsRNk2Ro3xTNMKsNrpvQtRtPqRI60c=", + "lastModified": 1711538967, + "narHash": "sha256-KSdOJ8seP3g30FaC2du8QjU9vumMnmzPR5wfkVRXQMk=", "ref": "refs/heads/master", - "rev": "e6bfb85c842edca36754bb8914e725fbaa1a83a6", - "revCount": 62586, + "rev": "0acfe391583d77a72051d505f05fab0ada056c49", + "revCount": 62632, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -157,11 +157,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1711931084, - "narHash": "sha256-goTZYO69KUv7NeP8bhiuyR+VRTk9tk5cHTkkWLvw1d8=", + "lastModified": 1713399842, + "narHash": "sha256-e2WgMXaoos+dJld+KcntBMqnS4tqtlKnXBFC+4KTuyA=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "39fbc1a06c422905a573beb2e81db7b73e31e099", + "rev": "db08c82c5085b992f88f1dc48ab543b347496653", "type": "github" }, "original": { @@ -189,10 +189,10 @@ "hls-2.4": "hls-2.4", "hls-2.5": "hls-2.5", "hls-2.6": "hls-2.6", + "hls-2.7": "hls-2.7", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", - "nix-tools-static": "nix-tools-static", "nixpkgs": [ "haskellNix", "nixpkgs-unstable" @@ -209,11 +209,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1711932614, - "narHash": "sha256-saNroCQcgXFbdgFoBv0Ff7uxcDfp09HSkoqN+NpbPNE=", + "lastModified": 1713401416, + "narHash": "sha256-n+ECHMHb5Yzz5n9F2BkK7YbRXdlRF/bs5CCpRT2KczU=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "a14aea84e0ee71df20505426459fa5544a261fed", + "rev": "7ff394777d4ba0505fd41a388d52994d250766e6", "type": "github" }, "original": { @@ -341,6 +341,23 @@ "type": "github" } }, + "hls-2.7": { + "flake": false, + "locked": { + "lastModified": 1708965829, + "narHash": "sha256-LfJ+TBcBFq/XKoiNI7pc4VoHg4WmuzsFxYJ3Fu+Jf+M=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "50322b0a4aefb27adc5ec42f5055aaa8f8e38001", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.7.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -434,23 +451,6 @@ "type": "github" } }, - "nix-tools-static": { - "flake": false, - "locked": { - "lastModified": 1706266250, - "narHash": "sha256-9t+GRk3eO9muCtKdNAwBtNBZ5dH1xHcnS17WaQyftwA=", - "owner": "input-output-hk", - "repo": "haskell-nix-example", - "rev": "580cb6db546a7777dad3b9c0fa487a366c045c4e", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "haskell-nix-example", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1657693803, @@ -640,11 +640,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1711930228, - "narHash": "sha256-hR0tP4AfdJr7YUsL7GX6YdOb7oqZ8wwC3yC/YKJ8Q6U=", + "lastModified": 1713399049, + "narHash": "sha256-BqDuOZMwj3bVfnpjZgCag0VTgY6wCcCJTfLYkt3S/c0=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "d10c550568fec53cddf8367401407782419b4795", + "rev": "6f7558135ca710c87348f4049758d69b110ce47f", "type": "github" }, "original": { diff --git a/nix-tools/nix-tools/nix-tools.cabal b/nix-tools/nix-tools/nix-tools.cabal index 5488268cfc..5936f46958 100644 --- a/nix-tools/nix-tools/nix-tools.cabal +++ b/nix-tools/nix-tools/nix-tools.cabal @@ -29,7 +29,7 @@ library , Stack2nix.External.Resolve , Stack2nix.Project , Stack2nix.Stack - build-depends: base >= 4 && <4.18 + build-depends: base >= 4 && <4.20 , Cabal >= 3.10.3 && <3.11 , Cabal-syntax >= 3.10 && <3.11 , aeson >= 2.0 && <2.3 @@ -46,7 +46,7 @@ library -- Needs https://github.com/input-output-hk/iohk-nix/commit/6a8c29117eff36ce975e02e01efc8b25d93fcb90#diff-6fb0c6517b547a8baf082d5d2d604842 -- to work with the data-dir issues when building components. -- This commit is included since 0.6.5. - , hnix >= 0.6.5 && <0.17 + , hnix >= 0.6.5 && <0.18 , hpack , http-client , http-client-tls diff --git a/nix-tools/overlay.nix b/nix-tools/overlay.nix index 55fc6365bb..5d63272fbf 100644 --- a/nix-tools/overlay.nix +++ b/nix-tools/overlay.nix @@ -1,7 +1,7 @@ final: _prev: let - compiler-nix-name = "ghc8107"; + compiler-nix-name = "ghc964"; nix-tools = nix-tools-set { nix-tools = nix-tools-unchecked; @@ -18,7 +18,7 @@ let src = ./.; compiler-nix-name = final.lib.mkDefault compiler-nix-name; - compilerSelection = p: p.haskell.compiler; + # compilerSelection = p: p.haskell.compiler; # tests need to fetch hackage configureArgs = final.lib.mkDefault "--disable-tests"; @@ -54,6 +54,9 @@ let inherit (project.hsPkgs.hpack.components.exes) hpack; + + inherit (project.hsPkgs.Cabal-syntax-json.components.exes) + cabal2json; }; warning = final.lib.mapAttrs diff --git a/nix-tools/static/project.nix b/nix-tools/static/project.nix index fa275759f3..e7ed7832e7 100644 --- a/nix-tools/static/project.nix +++ b/nix-tools/static/project.nix @@ -40,6 +40,9 @@ let plan-to-nix.dontStrip = false; stack-repos.dontStrip = false; }; + packages.cabal-install.components.exes.cabal.dontStrip = false; + packages.hpack.components.exes.hpack.dontStrip = false; + packages.Cabal-syntax-json.components.exes.cabal2json.dontStrip = false; }; @@ -53,6 +56,9 @@ let packages.nix-tools.ghcOptions = [ "-L${pkgs.lib.getLib pkgs.static-gmp}/lib" ]; + packages.Cabal-syntax-json.ghcOptions = [ + "-L${pkgs.lib.getLib pkgs.static-gmp}/lib" + ]; }; diff --git a/nix-tools/static/zipped.nix b/nix-tools/static/zipped.nix index 44898d49c1..c6390818c6 100644 --- a/nix-tools/static/zipped.nix +++ b/nix-tools/static/zipped.nix @@ -35,6 +35,7 @@ let drvs' = [ hsPkgs.cabal-install.components.exes.cabal hsPkgs.hpack.components.exes.hpack + hsPkgs.Cabal-syntax-json.components.exes.cabal2json ] ++ strippedNixToolsComponents; };