diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libxsmm')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libxsmm/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libxsmm/default.nix b/nixpkgs/pkgs/development/libraries/libxsmm/default.nix new file mode 100644 index 000000000000..5e4a56a6d4de --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libxsmm/default.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchFromGitHub, coreutils, gfortran, gnused +, python3, util-linux, which + +, enableStatic ? stdenv.hostPlatform.isStatic +}: + +let + version = "1.16.1"; +in stdenv.mkDerivation { + pname = "libxsmm"; + inherit version; + + src = fetchFromGitHub { + owner = "hfp"; + repo = "libxsmm"; + rev = version; + sha256 = "1c1qj6hcdfx11bvilnly92vgk1niisd2bjw1s8vfyi2f7ws1wnp0"; + }; + + nativeBuildInputs = [ + coreutils + gfortran + gnused + python3 + util-linux + which + ]; + + enableParallelBuilding = true; + + dontConfigure = true; + + makeFlags = let + static = if enableStatic then "1" else "0"; + in [ + "OMP=1" + "PREFIX=$(out)" + "STATIC=${static}" + ]; + + prePatch = '' + patchShebangs . + ''; + + meta = with stdenv.lib; { + description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives"; + license = licenses.bsd3; + homepage = "https://github.com/hfp/libxsmm"; + platforms = platforms.linux; + maintainers = with stdenv.lib.maintainers; [ chessai ]; + }; +} |