bscpkgs/pkgs/nodes/default.nix

90 lines
1.5 KiB
Nix
Raw Normal View History

2023-05-30 21:31:56 +08:00
{
stdenv
, lib
, automake
, autoconf
, libtool
, fetchFromGitHub
, pkg-config
, perl
, numactl
, hwloc
, papi
, boost
, autoreconfHook
2023-05-30 22:14:04 +08:00
, ovni
2023-05-30 21:31:56 +08:00
, nosv
, clangOmpss2
2023-05-30 21:31:56 +08:00
, useGit ? false
, gitUrl ? "ssh://git@gitlab-internal.bsc.es/nos-v/nodes.git"
, gitBranch ? "master"
, gitCommit ? "813da5976d06f587747dbb07aa911cfd855eff1a"
2023-05-30 21:31:56 +08:00
}:
with lib;
let
release = rec {
version = "1.1";
2023-05-30 21:31:56 +08:00
src = fetchFromGitHub {
owner = "bsc-pm";
repo = "nodes";
rev = "version-${version}";
hash = "sha256-Cfj3ozVK/sx/eccTjv7wZX8KUMdca0vY0RY0UWSRftg=";
2023-05-30 21:31:56 +08:00
};
};
git = rec {
version = src.shortRev;
src = builtins.fetchGit {
url = gitUrl;
ref = gitBranch;
rev = gitCommit;
};
};
source = if (useGit) then git else release;
in
stdenv.mkDerivation rec {
pname = "nodes";
inherit (source) src version;
enableParallelBuilding = true;
dontStrip = true;
separateDebugInfo = true;
2023-05-30 21:31:56 +08:00
configureFlags = [
"--with-nosv=${nosv}"
2023-05-30 22:14:04 +08:00
"--with-ovni=${ovni}"
] ++ lib.optionals doCheck [
"--with-nodes-clang=${clangOmpss2}"
];
doCheck = false;
nativeCheckInputs = [
clangOmpss2
2023-05-30 22:14:04 +08:00
];
2023-05-30 21:31:56 +08:00
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
# disable all by default, which includes bindnow.
hardeningDisable = [ "all" ];
buildInputs = [
autoreconfHook
autoconf
automake
libtool
pkg-config
boost
numactl
hwloc
papi
nosv
2023-05-30 22:14:04 +08:00
ovni
];
passthru = {
inherit nosv;
};
2023-05-30 21:31:56 +08:00
}