ysyx-workbench/npc/flow.nix
xinyangli 64aee9ae21
Some checks failed
Run CTests within npc / npc-test (flow) (push) Failing after 8s
Build abstract machine with nix / build-packages (abstract-machine) (push) Failing after 14s
Build abstract machine with nix / build-packages (nemu) (push) Successful in 41s
Build abstract machine with nix / build-packages (nemu-lib) (push) Successful in 9s
Build abstract machine with nix / build-packages (rv32Cross.abstract-machine) (push) Successful in 8s
Run CTests within npc / npc-test (flow-simlib) (push) Failing after 7s
npc,ci: add npc to nix packages
2024-08-14 17:01:37 +08:00

35 lines
552 B
Nix

{ mkSbtDerivation
, pkgs
, circt
}: mkSbtDerivation
{
pname = "npc-flow";
version = "0.0.0";
inherit pkgs;
src = ./core;
nativeBuildInputs = [
circt
];
CHISEL_FIRTOOL_PATH = "${circt}/bin";
depsWarmupCommand = ''
CHISEL_FIRTOOL_PATH="${circt}/bin" sbt run
'';
depsSha256 = "sha256-FsiEEEcv43lAz4RHO1CuCSj8syWdqnl602t7xnlkMrw=";
buildPhase =
let
emitArgs = "--target-dir build";
in
''
sbt "run ${emitArgs}"
'';
installPhase = ''
mkdir -p $out/share
cp build/* $out/share
'';
}