34 lines
691 B
Nix
34 lines
691 B
Nix
|
{
|
||
|
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
|
||
|
'';
|
||
|
}
|