diff --git a/overlay.nix b/overlay.nix index 1c8c788..2b32356 100644 --- a/overlay.nix +++ b/overlay.nix @@ -9,6 +9,7 @@ final: prev: rvb = final.callPackage ./pkgs/rvb/default.nix { }; rvb-clang = final.callPackage ./pkgs/rvb/default.nix { stdenv = final.stdenvClangEpi; }; + stream = final.callPackage ./pkgs/stream/default.nix { }; blis = ((prev.blis.override { blas64 = true; diff --git a/pkgs/stream/default.nix b/pkgs/stream/default.nix new file mode 100644 index 0000000..84671c6 --- /dev/null +++ b/pkgs/stream/default.nix @@ -0,0 +1,33 @@ +{ + 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 + ''; +}