forked from rarias/jungle
73 lines
1.2 KiB
Nix
73 lines
1.2 KiB
Nix
{
|
|
backendStdenv,
|
|
fetchFromGitHub,
|
|
automake,
|
|
autoconf,
|
|
libtool,
|
|
gnumake,
|
|
autoreconfHook,
|
|
boost,
|
|
cudatoolkit,
|
|
libcublas,
|
|
cuda_cudart,
|
|
|
|
useGit ? false,
|
|
gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tacuda/tacuda.git",
|
|
gitBranch ? "main",
|
|
gitCommit ? "35234f9445e6149a2bd38d119841e2485d6ee05e",
|
|
}:
|
|
|
|
let
|
|
|
|
release_ver = "2.1.0";
|
|
release = {
|
|
version = release_ver;
|
|
src = fetchFromGitHub {
|
|
owner = "bsc-pm";
|
|
repo = "tacuda";
|
|
rev = release_ver;
|
|
hash = "sha256-Cj3EiLVJSLvRv0ydeg7Vp4SpkniEqHkcWF+YOJQ8EcM=";
|
|
};
|
|
};
|
|
|
|
git = rec {
|
|
version = src.shortRev;
|
|
src = builtins.fetchGit {
|
|
url = gitUrl;
|
|
ref = gitBranch;
|
|
rev = gitCommit;
|
|
};
|
|
};
|
|
|
|
source = if (useGit) then git else release;
|
|
|
|
in
|
|
|
|
backendStdenv.mkDerivation {
|
|
pname = "tacuda";
|
|
inherit (source) src version;
|
|
|
|
enableParallelBuilding = true;
|
|
separateDebugInfo = true;
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
automake
|
|
autoconf
|
|
libtool
|
|
gnumake
|
|
];
|
|
|
|
patches = [ ./fix_config.patch ];
|
|
|
|
configureFlags = [ "--with-cuda-include=${cudatoolkit}/include" ];
|
|
|
|
buildInputs = [
|
|
boost
|
|
libcublas
|
|
cuda_cudart
|
|
];
|
|
|
|
}
|