Skip to content

Commit 70f0b3d

Browse files
committed
[nix] support nix run
Signed-off-by: unlsycn <[email protected]>
1 parent 6ea7e8a commit 70f0b3d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

templates/chisel/nix/gcd/gcd.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ let
7070

7171
outputs = [ "out" "elaborator" ];
7272

73+
meta.mainProgram = "elaborator";
74+
7375
buildPhase = ''
7476
mill -i '__.assembly'
7577
'';

templates/chisel/nix/gcd/vcs.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ in stdenv.mkDerivation {
1515

1616
src = rtl;
1717

18+
meta.mainProgram = binName;
19+
1820
buildPhase = ''
1921
runHook preBuild
2022

templates/chisel/nix/gcd/verilated.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ in stdenv.mkDerivation {
1919
inherit (rtl) target;
2020
};
2121

22+
meta.mainProgram = vName;
23+
2224
buildPhase = ''
2325
runHook preBuild
2426

0 commit comments

Comments
 (0)