6 # Enable BLAS interface with 64-bit integer width.
9 # Target architecture. x86_64 builds Intel and AMD kernels.
10 , withArchitecture ? "x86_64"
12 # Enable OpenMP-based threading.
17 blasIntSize = if blas64 then "64" else "32";
18 in stdenv.mkDerivation rec {
22 src = fetchFromGitHub {
26 sha256 = "sha256-lAo6C34QQvXr3LmcsnTp4+Imi/lKxzcWu3EJkVgLvDI=";
38 enableParallelBuilding = true;
42 "--blas-int-size=${blasIntSize}"
43 ] ++ lib.optionals withOpenMP [ "--enable-threading=openmp" ]
44 ++ [ withArchitecture ];
47 patchShebangs configure build/flatten-headers.py
51 ln -s $out/lib/libblis.so.4 $out/lib/libblas.so.3
52 ln -s $out/lib/libblis.so.4 $out/lib/libcblas.so.3
53 ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
54 ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
58 description = "BLAS-compatible linear algebra library";
59 homepage = "https://github.com/flame/blis";
60 license = licenses.bsd3;
61 maintainers = with maintainers; [ stephen-huan ];
62 platforms = [ "x86_64-linux" ];