diff options
Diffstat (limited to 'pkgs/development/libraries/dnnl/default.nix')
-rw-r--r-- | pkgs/development/libraries/dnnl/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/libraries/dnnl/default.nix b/pkgs/development/libraries/dnnl/default.nix new file mode 100644 index 00000000000..8a02ea1598c --- /dev/null +++ b/pkgs/development/libraries/dnnl/default.nix @@ -0,0 +1,39 @@ +{ stdenv, lib, fetchFromGitHub, substituteAll, cmake, bash }: + +stdenv.mkDerivation rec { + pname = "dnnl"; + version = "1.1.2"; + + src = fetchFromGitHub { + owner = "intel"; + repo = "mkl-dnn"; + rev = "v${version}"; + sha256 = "150cdyfiw4izvzmbmdqidwadppb1qjmzhpaqjczm397ygi1m92l1"; + }; + + # Generic fix upstreamed in https://github.com/intel/mkl-dnn/pull/631 + # Delete patch when 1.2.0 is released + patches = [ (substituteAll { + src = ./bash-to-sh.patch; + inherit bash; + }) ]; + + outputs = [ "out" "dev" "doc" ]; + + nativeBuildInputs = [ cmake ]; + + # The test driver doesn't add an RPath to the build libdir + preCheck = '' + export LD_LIBRARY_PATH=$PWD/src + ''; + + doCheck = true; + + meta = with lib; { + description = "Deep Neural Network Library (DNNL)"; + homepage = "https://intel.github.io/mkl-dnn/dev_guide_transition_to_dnnl.html"; + license = licenses.asl20; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ alexarice bhipple ]; + }; +} |