From fb698780d85ccd93178d4fd3196b52c45de582e9 Mon Sep 17 00:00:00 2001 From: jaschutte <34577095+jaschutte@users.noreply.github.com> Date: Mon, 28 Jul 2025 15:34:02 +0200 Subject: [PATCH] Nix use clash-compiler GHC version Rather than use a predefined local version of GHC, use the same version the clash compiler uses. This makes it so the flake doesn't have to get independently updated and can just follow whatever clash-compiler has. It also updates the cabal version of CI to a supported release. Cabal 3.6 supported was dropped ??? ago and it broke CI. --- .github/workflows/ci.yml | 2 +- flake.lock | 6 +++--- flake.nix | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8c4c55..8393352 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - cabal: ["3.6"] + cabal: ["latest"] ghc: - "8.6.5" - "8.10.7" diff --git a/flake.lock b/flake.lock index a3dc52e..6cbef75 100644 --- a/flake.lock +++ b/flake.lock @@ -11,11 +11,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1752917053, - "narHash": "sha256-oI4b1MZ1MR7WLeyZw9k/g6P+707i7RMhdMxkSIBga2Q=", + "lastModified": 1753722205, + "narHash": "sha256-tfBkzRbiYVX6f0oSnY86Uem/JSsCmYXfAJxW+ZKmWQk=", "owner": "clash-lang", "repo": "clash-compiler", - "rev": "229f243605f5ac88fc4e65076acec650ce1164df", + "rev": "43a1c722af29f34c6faf18f14e6cf46a3cfba80f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4a74d9c..845665f 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ flake-utils.lib.eachDefaultSystem (system: let # What version of the GHC compiler to use - compiler-version = "ghc910"; + compiler-version = clash-compiler.ghcVersion.${system}; pkgs = (import clash-compiler.inputs.nixpkgs { inherit system; @@ -26,7 +26,7 @@ { # Expose the overlay which adds circuit-notation # The base of the overlay is clash-pkgs - overlay = overlay; + overlays.default = overlay; devShells.default = hs-pkgs.shellFor { packages = p: [