ysyx-workbench/npc/flow.nix

36 lines
552 B
Nix
Raw Normal View History

2024-08-14 09:01:37 +00:00
{ 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
'';
}