Add nos-v release by default

This commit is contained in:
Rodrigo Arias 2023-05-30 15:31:12 +02:00
parent 0e176cb2a9
commit d8c19eb4b4

View File

@ -2,39 +2,53 @@
stdenv stdenv
, lib , lib
, autoreconfHook , autoreconfHook
, fetchFromGitHub
, pkgconfig , pkgconfig
, numactl , numactl
, hwloc , hwloc
, ovni ? null , ovni ? null
, enableOvni ? false , useGit ? false
, gitURL ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git" , gitURL ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git"
, gitBranch ? "master" , gitBranch ? "master"
, gitCommit ? null , gitCommit ? "0edc81d065f20d3d2f8acf94df1d2640dc430d5e"
}: }:
with lib; with lib;
stdenv.mkDerivation rec { let
pname = "nosv"; release = rec {
version = "${src.shortRev}"; version = "1.0.0";
src = fetchFromGitHub {
owner = "bsc-pm";
repo = "nos-v";
rev = "${version}";
sha256 = "sha256-1Dsxd7OQYxnPvFnpGgCTlG9wbxV8vQpzvSy+cdPD8ro=";
};
};
inherit gitURL gitCommit gitBranch; git = rec {
version = src.shortRev;
src = builtins.fetchGit ({ src = builtins.fetchGit {
url = gitURL; url = gitUrl;
ref = gitBranch; ref = gitBranch;
} // (optionalAttrs (gitCommit != null) { rev = gitCommit; }) rev = gitCommit;
); };
};
source = if (useGit) then git else release;
in
stdenv.mkDerivation rec {
pname = "nosv";
inherit (source) src version;
inherit gitURL gitCommit gitBranch;
hardeningDisable = [ "all" ]; hardeningDisable = [ "all" ];
dontStrip = true; dontStrip = true;
configureFlags = [ "--with-ovni=${ovni}" ];
configureFlags = optional (enableOvni) "--with-ovni=${ovni}";
buildInputs = [ buildInputs = [
autoreconfHook autoreconfHook
pkgconfig pkgconfig
numactl numactl
hwloc hwloc
] ++ (optional (enableOvni) ovni); ovni
} ];
}