36 lines
552 B
Nix
36 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
|
||
|
'';
|
||
|
}
|