nixos-riscv/pkgs/stream/default.nix

34 lines
691 B
Nix
Raw Normal View History

2024-09-25 13:08:40 +02:00
{
stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "stream";
version = "4dbce1d0";
src = fetchFromGitHub {
owner = "jeffhammond";
repo = "STREAM";
rev = "4dbce1d0fdb7410e8f21b48f3381bc0a1341967f";
sha256 = "sha256-sBwdPeaMyI/wH1Nq0yQtb/kvi5913e0azXaulOJIG3A=";
};
# CFLAGS='-O2 -fopenmp -DSTREAM_ARRAY_SIZE=40000000'
buildPhase = ''
set -x
make stream_c.exe CC=$CC FC=$FC CFLAGS=-O2
set +x
'';
#nativeBuildInputs = [ gfortran ];
dontStrip = true;
dontConfigure = true;
enableParallelBuilding = false;
hardeningDisable = [ "all" ];
installPhase = ''
mkdir -p $out/bin
cp -a stream_c.exe $out/bin/stream
'';
}