2021-11-30 16:18:06 +01:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, lib
|
|
|
|
, autoreconfHook
|
2023-05-30 15:31:12 +02:00
|
|
|
, fetchFromGitHub
|
2021-11-30 16:18:06 +01:00
|
|
|
, pkgconfig
|
|
|
|
, numactl
|
|
|
|
, hwloc
|
|
|
|
, ovni ? null
|
2023-05-30 15:31:12 +02:00
|
|
|
, useGit ? false
|
2023-07-14 16:44:24 +02:00
|
|
|
, gitUrl ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git"
|
2021-11-30 16:18:06 +01:00
|
|
|
, gitBranch ? "master"
|
2023-05-30 15:31:12 +02:00
|
|
|
, gitCommit ? "0edc81d065f20d3d2f8acf94df1d2640dc430d5e"
|
2021-11-30 16:18:06 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2023-05-30 15:31:12 +02:00
|
|
|
let
|
|
|
|
release = rec {
|
|
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bsc-pm";
|
|
|
|
repo = "nos-v";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "sha256-1Dsxd7OQYxnPvFnpGgCTlG9wbxV8vQpzvSy+cdPD8ro=";
|
|
|
|
};
|
|
|
|
};
|
2021-11-30 16:18:06 +01:00
|
|
|
|
2023-05-30 15:31:12 +02:00
|
|
|
git = rec {
|
|
|
|
version = src.shortRev;
|
|
|
|
src = builtins.fetchGit {
|
|
|
|
url = gitUrl;
|
2021-11-30 16:18:06 +01:00
|
|
|
ref = gitBranch;
|
2023-05-30 15:31:12 +02:00
|
|
|
rev = gitCommit;
|
|
|
|
};
|
|
|
|
};
|
2021-11-30 16:18:06 +01:00
|
|
|
|
2023-05-30 15:31:12 +02:00
|
|
|
source = if (useGit) then git else release;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nosv";
|
|
|
|
inherit (source) src version;
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
dontStrip = true;
|
|
|
|
configureFlags = [ "--with-ovni=${ovni}" ];
|
|
|
|
buildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkgconfig
|
|
|
|
numactl
|
|
|
|
hwloc
|
|
|
|
ovni
|
|
|
|
];
|
|
|
|
}
|