bscpkgs/bsc/nosv/default.nix

55 lines
1023 B
Nix
Raw Normal View History

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
2021-11-30 16:18:06 +01:00
, gitURL ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git"
, 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;
inherit gitURL gitCommit gitBranch;
hardeningDisable = [ "all" ];
dontStrip = true;
configureFlags = [ "--with-ovni=${ovni}" ];
buildInputs = [
autoreconfHook
pkgconfig
numactl
hwloc
ovni
];
}