nixos-riscv/pkgs/rvb/default.nix

36 lines
796 B
Nix

{
stdenv
, blis
, gitBranch ? "nix-fixes"
, gitURL ? "git@gitlab-internal.bsc.es:rarias/risc-v-benchmarks.git"
, gitCommit ? "da202d6f818421b72e06c39b5417ad2f8f6ca23c"
}:
stdenv.mkDerivation rec {
pname = "rvb";
version = "${src.shortRev}";
src = builtins.fetchGit {
url = gitURL;
ref = gitBranch;
rev = gitCommit;
submodules = true;
};
buildInputs = [ blis ];
configurePhase = ''
export RVB_ROOT=$(readlink -f .)
export CBLAS_HOME=${blis}
export CBLAS_INC=${blis}/include/blis
export CBLAS_LIB=${blis}/lib
rm Makefile.in
ln -s ${./Makefile.in} Makefile.in
rm Makefile
ln -s ${./Makefile} Makefile
'';
enableParallelBuilding = false;
hardeningDisable = [ "all" ];
installFlags = [ "DESTDIR=$(out)" ];
dontStrip = true;
}