From 2336df956e43ccf814aa0c84f25bbc0127c4bc61 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 1/2] 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. --- flake.lock | 6 +++--- flake.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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: [ From bb8079200558c28bc308a409789919f0ea24bac3 Mon Sep 17 00:00:00 2001 From: jaschutte <34577095+jaschutte@users.noreply.github.com> Date: Tue, 29 Jul 2025 11:08:19 +0200 Subject: [PATCH 2/2] test --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8c4c55..e168311 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,15 +45,17 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: haskell-actions/setup@v2 + - uses: haskell-actions/setup@v2.8.0 id: setup-haskell-cabal name: Setup Haskell with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + cabal-update: false - name: Freeze run: | + ls ~/.cabal/** -al cabal update cabal freeze