hpcstat/default.nix

19 lines
626 B
Nix
Raw Normal View History

2024-05-04 12:22:41 +08:00
{
stdenv, cmake, pkg-config, standalone ? false, makeWrapper,
2024-05-04 15:22:17 +08:00
boost, fmt, zxorm, nlohmann_json, zpp-bits, range-v3, nameof, openssh, sqlite
2024-05-04 12:22:41 +08:00
}: stdenv.mkDerivation
{
name = "hpcstat";
src = ./.;
buildInputs =
2024-05-04 15:22:17 +08:00
[ boost fmt zxorm nlohmann_json zpp-bits range-v3 nameof sqlite ];
2024-05-04 12:22:41 +08:00
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
postInstall =
if standalone then "cp ${openssh}/bin/{ssh-add,ssh-keygen} $out/bin"
else
''
wrapProgram $out/bin/hpcstat --set HPCSTAT_SHAREDIR $out/share/hpcstat \
2024-05-04 15:38:56 +08:00
--set HPCSTAT_DATADIR /var/lib/hpcstat --set HPCSTAT_SSH_BINDIR ${openssh}/bin
2024-05-04 12:22:41 +08:00
'';
}