Skip to content

Commit a285cac

Browse files
committed
[nix] fix infinite-recursion when importing overlay
Signed-off-by: Avimitin <[email protected]>
1 parent 095033d commit a285cac

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
inputs@{
1515
self,
1616
nixpkgs,
17+
nixpkgs-for-llvm,
1718
mill-ivy-fetcher,
1819
circt-follow,
1920
...
@@ -52,6 +53,10 @@
5253
mill-ivy-fetcher.overlays.default
5354
# Follow CIRCT from sequencer/zaozi overlay
5455
circt-follow.overlays.default
56+
# pin riscv32 packages to avoid consistent breakage
57+
(final: prev: {
58+
rv32_nixpkgs = nixpkgs-for-llvm.legacyPackages."${system}".pkgsCross.riscv32-embedded;
59+
})
5560
overlay
5661
];
5762
};

nix/overlay.nix

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
{ self }:
2-
31
final: prev:
42

53
let
64
llvmForRVV_attrName = "llvmPackages_git";
7-
rv32_pkgs =
8-
self.inputs.nixpkgs-for-llvm.legacyPackages."${final.system}".pkgsCross.riscv32-embedded;
9-
rv32_buildPkgs = rv32_pkgs.buildPackages;
5+
rv32_pkgs = final.rv32_nixpkgs;
6+
rv32_buildPkgs = final.rv32_nixpkgs.buildPackages;
107
in
118
rec {
12-
inherit rv32_pkgs rv32_buildPkgs; # for easier inspection
13-
149
getEnv' =
1510
key:
1611
let

0 commit comments

Comments
 (0)