From 8bc78cf9baf1adaef1060d3b3376dc35ed15d0e9 Mon Sep 17 00:00:00 2001 From: Pablo Lamela Date: Wed, 1 Apr 2026 01:45:52 +0200 Subject: [PATCH] Add `ghc914` dev shell for `x86_64-linux` and make haddock build in CI use it --- .github/workflows/github-page.yml | 2 ++ flake.nix | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml index 3002f776f5..d9e3f3e764 100644 --- a/.github/workflows/github-page.yml +++ b/.github/workflows/github-page.yml @@ -25,6 +25,8 @@ jobs: substituters = https://cache.iog.io/ https://cache.nixos.org/ - uses: rrbutani/use-nix-shell-action@v1 + with: + devShell: .#ghc914 - name: Update cabal indices run: | diff --git a/flake.nix b/flake.nix index f7cd3f5d19..43be3484b8 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,8 @@ defaultCompiler = "ghc9122"; # Used for cross compilation for windows. crossCompilerVersion = defaultCompiler; + # Used for haddock generation (avoids GHC 9.12 tyConStupidTheta panic) + haddockCompiler = "ghc914"; in inputs.flake-utils.lib.eachSystem supportedSystems ( system: let @@ -226,7 +228,11 @@ # TODO remove this module when removing proto-lens SRP # Override proto-lens source to use fixed symlinks (inputMap provides the fixed # source for plan computation; this module provides it for the build phase) - ({lib, config, ...}: let + ({ + lib, + config, + ... + }: let protoLensPackages = [ "proto-lens" "proto-lens-arbitrary" @@ -242,9 +248,10 @@ "proto-lens-benchmarks" ]; in { - packages = lib.genAttrs + packages = + lib.genAttrs (builtins.filter (p: config.packages ? ${p}) protoLensPackages) - (p: { src = lib.mkForce (fixProtoLensSrc + "/${p}"); }); + (p: {src = lib.mkForce (fixProtoLensSrc + "/${p}");}); }) ({...}: { packages.cardano-api = { @@ -306,7 +313,7 @@ then defaultCompiler else stableCompiler; in - lib.genAttrs [osDependentStableCompiler crossCompilerVersion] (compiler-nix-name: { + lib.genAttrs [osDependentStableCompiler crossCompilerVersion haddockCompiler] (compiler-nix-name: { inherit compiler-nix-name; }); }