diff --git a/dynamic.nix b/dynamic.nix index 5fd0fe5..1282e10 100644 --- a/dynamic.nix +++ b/dynamic.nix @@ -1,6 +1,6 @@ # define a development shell for dynamically linked applications (default) { self, pkgs, compiler, compiler-nix-name, toolsModule, withHLS ? true, withHlint ? true, withIOG ? true, withIOGFull ? false, withGHCTooling ? false }: -let tool-version-map = (import ./tool-map.nix) self; +let tool-version-map = (import ./tool-map.nix) (self // { inputs = self.inputs // {cabal = if withGHCTooling then self.inputs.cabal-experimental else self.inputs.cabal;}; }); tool = tool-name: pkgs.pkgsBuildBuild.haskell-nix.tool compiler-nix-name tool-name [(tool-version-map compiler-nix-name tool-name) toolsModule]; cabal-install = tool "cabal"; haskell-tools = @@ -87,11 +87,13 @@ pkgs.mkShell { '' + lib.optionalString withGHCTooling '' export HADRIAN_CONFIGURE_FLAGS="--with-gmp-includes=\"${lib.getDev gmp}/include\" --with-gmp-libraries=\"${lib.getLib gmp}/lib\"" + echo "======= Building with Hadrian =======" echo "HADRIAN_CONFIGURE_FLAGS set to $HADRIAN_CONFIGURE_FLAGS" echo "To build GHC, run" echo " ./boot" echo " ./configure \"$HADRIAN_CONFIGURE_FLAGS\"" echo " ./hadrian/build -j" + echo "======= End of Hadrian build =======" ''; buildInputs = diff --git a/flake.lock b/flake.lock index 54cb9b2..940028b 100644 --- a/flake.lock +++ b/flake.lock @@ -36,16 +36,15 @@ "cabal": { "flake": false, "locked": { - "lastModified": 1742274496, - "narHash": "sha256-FJotImCQxXPIQrhbMK33CeuOauLzKoTO2KvFHNtRo+g=", + "lastModified": 1743338359, + "narHash": "sha256-OHjT+UbGcyz46cUW+/eLeezvO0om/vSQ8BZ/oLld1AE=", "owner": "stable-haskell", "repo": "cabal", - "rev": "9b66d2cb6229e5864ef1d1c1ffee59bb2d8d9780", + "rev": "c0d52b2cb168d3204b0c56a85a42be65d87cdabd", "type": "github" }, "original": { "owner": "stable-haskell", - "ref": "wip/make-build", "repo": "cabal", "type": "github" } @@ -101,6 +100,23 @@ "type": "github" } }, + "cabal-experimental": { + "flake": false, + "locked": { + "lastModified": 1744014992, + "narHash": "sha256-UsMDgfti/yctTcRt6c8h56/CPjviG7+qlrKy9FXvrN0=", + "owner": "stable-haskell", + "repo": "cabal", + "rev": "7e50837ade188504d1401bad932a5b8b3769661e", + "type": "github" + }, + "original": { + "owner": "stable-haskell", + "ref": "angerman/cross", + "repo": "cabal", + "type": "github" + } + }, "cardano-shell": { "flake": false, "locked": { @@ -626,6 +642,7 @@ "root": { "inputs": { "cabal": "cabal", + "cabal-experimental": "cabal-experimental", "flake-utils": "flake-utils", "haskellNix": "haskellNix", "iohk-nix": "iohk-nix", diff --git a/flake.nix b/flake.nix index e422c90..5a62054 100644 --- a/flake.nix +++ b/flake.nix @@ -5,8 +5,10 @@ inputs.nixpkgs.follows = "haskellNix/nixpkgs-2411"; inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.iohk-nix.url = "github:input-output-hk/iohk-nix"; - inputs.cabal.url = "github:stable-haskell/cabal?ref=wip/make-build"; + inputs.cabal.url = "github:stable-haskell/cabal"; inputs.cabal.flake = false; + inputs.cabal-experimental.url = "github:stable-haskell/cabal?ref=angerman/cross"; + inputs.cabal-experimental.flake = false; outputs = { self, nixpkgs, flake-utils, haskellNix, iohk-nix, ... }: let overlays = {