diff --git a/.github/workflows/check-cabal-files.yml b/.github/workflows/check-cabal-files.yml index dc8a7048b9..4dbd0c7fcd 100644 --- a/.github/workflows/check-cabal-files.yml +++ b/.github/workflows/check-cabal-files.yml @@ -18,7 +18,7 @@ jobs: uses: input-output-hk/setup-haskell@v1 id: setup-haskell with: - cabal-version: "3.10.1.0" + cabal-version: "3.14.1.1" - uses: actions/checkout@v3 diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 55d47df444..1364f3b6d5 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: ghc: ["9.6", "9.8", "9.10"] - cabal: ["3.12"] + cabal: ["3.14"] sys: - { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' } - { os: ubuntu-latest, shell: bash } diff --git a/.github/workflows/hls.yml b/.github/workflows/hls.yml index 9ef42b3024..936433d110 100644 --- a/.github/workflows/hls.yml +++ b/.github/workflows/hls.yml @@ -5,17 +5,17 @@ on: push: branches: - master - + permissions: contents: read - + jobs: test-hls-works: env: # Modify this value to "invalidate" the cache. HLS_CACHE_VERSION: "2024-06-25" - + runs-on: ubuntu-latest timeout-minutes: 60 steps: @@ -27,7 +27,7 @@ jobs: extra_nix_config: | trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= substituters = https://cache.iog.io/ https://cache.nixos.org/ - nix_path: nixpkgs=channel:nixos-unstable + nix_path: nixpkgs=channel:nixos-unstable - name: Open nix environment uses: rrbutani/use-nix-shell-action@v1 - name: Update dependencies diff --git a/.github/workflows/release-upload.yml b/.github/workflows/release-upload.yml index 2d6d6e1a4e..e095d3e90c 100644 --- a/.github/workflows/release-upload.yml +++ b/.github/workflows/release-upload.yml @@ -159,10 +159,10 @@ jobs: derivation+="${{ matrix.arch }}" ;; "x86_64-linux") - derivation+="x86_64-linux.ghc965-x86_64-unknown-linux-musl" + derivation+="x86_64-linux.ghc966-x86_64-unknown-linux-musl" ;; "aarch64-linux") - derivation+="x86_64-linux.ghc965-aarch64-unknown-linux-musl" + derivation+="x86_64-linux.ghc966-aarch64-unknown-linux-musl" ;; *) echo "Unexpected matrix.arch value: ${{ matrix.arch }}" diff --git a/flake.nix b/flake.nix index 354cae70cb..4d5c9670f7 100644 --- a/flake.nix +++ b/flake.nix @@ -23,30 +23,7 @@ # see flake `variants` below for alternative compilers defaultCompiler = "ghc982"; haddockShellCompiler = defaultCompiler; - mingwVersion = "ghc965"; # Used for cross compilation, and so referenced in .github/workflows/release-upload.yml. Adapt the latter if you change this value. - cabalHeadOverlay = final: prev: { - cabal-head = - (final.haskell-nix.cabalProject { - # cabal master commit containing https://github.com/haskell/cabal/pull/8726 - # this fixes haddocks generation - 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; - }; + crossCompilerVersion = "ghc966"; # Used for cross compilation, and so referenced in .github/workflows/release-upload.yml. Adapt the latter if you change this value. in {inherit (inputs) incl;} // inputs.flake-utils.lib.eachSystem supportedSystems ( @@ -61,7 +38,6 @@ 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; @@ -88,7 +64,7 @@ # we also want cross compilation to windows on linux (and only with default compiler). crossPlatforms = p: - lib.optionals (system == "x86_64-linux" && config.compiler-nix-name == mingwVersion) + lib.optionals (system == "x86_64-linux" && config.compiler-nix-name == crossCompilerVersion) [ p.mingwW64 # x86_64-windows p.aarch64-multiplatform-musl # aarch64-linux (static) @@ -107,8 +83,7 @@ # tools we want in our shell, from hackage shell.tools = { - # for now we're using latest cabal for `cabal haddock-project` fixes - # cabal = "3.10.3.0"; + cabal = "3.14.1.1"; ghcid = "0.8.8"; } // lib.optionalAttrs (config.compiler-nix-name == defaultCompiler) { @@ -120,7 +95,7 @@ stylish-haskell = "0.14.6.0"; }; # and from nixpkgs or other inputs - shell.nativeBuildInputs = with nixpkgs; [gh jq yq-go actionlint shellcheck cabal-head] ++ (lib.optional isDarwin macOS-security); + shell.nativeBuildInputs = with nixpkgs; [gh jq yq-go actionlint shellcheck] ++ (lib.optional isDarwin macOS-security); # disable Hoogle until someone request it shell.withHoogle = false; # Skip cross compilers for the shell @@ -191,7 +166,7 @@ flake = cabalProject.flake ( lib.optionalAttrs (system == "x86_64-linux") { # on linux, build/test other supported compilers - variants = lib.genAttrs ["ghc8107" mingwVersion] (compiler-nix-name: { + variants = lib.genAttrs ["ghc8107" crossCompilerVersion] (compiler-nix-name: { inherit compiler-nix-name; }); }