diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml index 470397e6bc..d6e72d4684 100644 --- a/.github/workflows/github-page.yml +++ b/.github/workflows/github-page.yml @@ -2,8 +2,9 @@ name: "Haddock documentation" on: push: - branches: - - main + # FIXME uncomment prior to merge + # branches: + # - main jobs: build: diff --git a/flake.lock b/flake.lock index 2282b356a7..c0cbb7fe08 100644 --- a/flake.lock +++ b/flake.lock @@ -242,11 +242,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1719794527, - "narHash": "sha256-qHo/KumtwAzPkfLWODu/6EFY/LeK+C7iPJyAUdT8tGA=", + "lastModified": 1719967069, + "narHash": "sha256-QQ+y+vW0TXPFhcMjOTUH+M19DuqE2KoEfp6R9SGCcqM=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "da2a3bc9bd1b3dd41bb147279529c471c615fd3e", + "rev": "c4a407c5ed49b77ab65247dabd02477153f2292c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ec14ec98f2..2ac32e693c 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,29 @@ # "aarch64-linux" - disable these temporarily because the build is broken # "aarch64-darwin" - disable these temporarily because the build is broken ]; + + # see flake `variants` below for alternative compilers + defaultCompiler = "ghc965"; + haddockShellCompiler = defaultCompiler; + + cabalHeadOverlay = final: prev: + { + cabal-head = (final.haskell-nix.cabalProject { + # cabal master commit containing https://github.com/haskell/cabal/pull/8726 + src = final.fetchFromGitHub { + owner = "haskell"; + repo = "cabal"; + rev = "6eaba73ac95c62f8dc576e227b5f9c346910303c"; + hash = "sha256-Uu/w6AK61F7XPxtKe+NinuOR4tLbaT6rwxVrQghDQjo="; + }; + index-state = "2024-07-03T00:00:00Z"; + compiler-nix-name = haddockShellCompiler; + cabalProject = '' + packages: Cabal-syntax Cabal cabal-install-solver cabal-install + ''; + configureArgs = "--disable-benchmarks --disable-tests"; + }).cabal-install.components.exes.cabal; + }; in inputs.flake-utils.lib.eachSystem supportedSystems ( system: let @@ -38,15 +61,13 @@ inputs.haskellNix.overlay # configure haskell.nix to use iohk-nix crypto librairies. inputs.iohkNix.overlays.haskell-nix-crypto + cabalHeadOverlay ]; inherit system; inherit (inputs.haskellNix) config; }; inherit (nixpkgs) lib; - # see flake `variants` below for alternative compilers - defaultCompiler = "ghc964"; - haddockShellCompiler = defaultCompiler; # We use cabalProject' to ensure we don't build the plan for # all systems. cabalProject = nixpkgs.haskell-nix.cabalProject' ({config, ...}: { @@ -87,7 +108,7 @@ stylish-haskell = "0.14.5.0"; }; # and from nixpkgs or other inputs - shell.nativeBuildInputs = with nixpkgs; [ gh jq yq-go actionlint shellcheck ]; + shell.nativeBuildInputs = with nixpkgs; [ gh jq yq-go actionlint shellcheck cabal-head ]; # disable Hoogle until someone request it shell.withHoogle = false; # Skip cross compilers for the shell