ysyx-workbench/npc/flow-simlib.nix

48 lines
850 B
Nix
Raw Normal View History

2024-08-14 09:01:37 +00:00
{ flow
, cmake
, ninja
, nvboard
, cli11
, flex
, bison
, verilator
, spdlog
, mini-gdbstub
, stdenv
, lib
, topmodule ? "Flow"
}:
stdenv.mkDerivation {
pname = "npc-flow-simlib";
version = "0.0.0";
src = ./.;
nativeBuildInputs = [
cmake
ninja
flex
bison
nvboard
verilator
flow
];
buildInputs = [
cli11
spdlog
mini-gdbstub
];
cmakeFlags = with lib; [
(cmakeBool "ENABLE_YSYX_GIT_TRACKER" false)
(cmakeBool "BUILD_CHISEL_EMIT_TARGET" false)
(cmakeOptionType "string" "TOPMODULE" "${topmodule}")
(cmakeOptionType "string" "CHISEL_OUTPUT_VERILATOR_CONF" "${flow}/share/conf.vlt")
(cmakeOptionType "string" "CHISEL_OUTPUT_TOPMODULE" "${flow}/share/${topmodule}.sv")
(cmakeOptionType "string" "CHISEL_OUTPUT_DIR" "${flow}/share")
];
enableParallelBuilding = true;
}