summary refs log tree commit diff
path: root/pkgs/development/libraries/oneDNN
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2020-04-22 22:24:43 -0400
committerBenjamin Hipple <bhipple@protonmail.com>2020-04-22 22:24:43 -0400
commitbab9dabd64df4cfa2d96c1d2abfb05ff7431420a (patch)
treed8283f48c0f22d31b469e1b6cf9a7abe70a8014e /pkgs/development/libraries/oneDNN
parentc039152ba8619ecbddf743d182200f19a2514476 (diff)
downloadnixpkgs-bab9dabd64df4cfa2d96c1d2abfb05ff7431420a.tar
nixpkgs-bab9dabd64df4cfa2d96c1d2abfb05ff7431420a.tar.gz
nixpkgs-bab9dabd64df4cfa2d96c1d2abfb05ff7431420a.tar.bz2
nixpkgs-bab9dabd64df4cfa2d96c1d2abfb05ff7431420a.tar.lz
nixpkgs-bab9dabd64df4cfa2d96c1d2abfb05ff7431420a.tar.xz
nixpkgs-bab9dabd64df4cfa2d96c1d2abfb05ff7431420a.tar.zst
nixpkgs-bab9dabd64df4cfa2d96c1d2abfb05ff7431420a.zip
dnnl: rename to oneDNN to track upstream project rename
See the link in the default.nix file for details.  This adds an alias for
backwards compatibility.
Diffstat (limited to 'pkgs/development/libraries/oneDNN')
-rw-r--r--pkgs/development/libraries/oneDNN/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/libraries/oneDNN/default.nix b/pkgs/development/libraries/oneDNN/default.nix
new file mode 100644
index 00000000000..7d9adca074c
--- /dev/null
+++ b/pkgs/development/libraries/oneDNN/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+# This was originally called mkl-dnn, then it was renamed to dnnl, and it has
+# just recently been renamed again to oneDNN. See here for details:
+# https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn
+stdenv.mkDerivation rec {
+  pname = "oneDNN";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "oneDNN";
+    rev = "v${version}";
+    sha256 = "162fb0c7klahz2irchhyxympi4fq4yp284apc53cadbss41mzld9";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  # The test driver doesn't add an RPath to the build libdir
+  preCheck = ''
+    export LD_LIBRARY_PATH=$PWD/src
+  '';
+
+  # The cmake install gets tripped up and installs a nix tree into $out, in
+  # addition to the correct install; clean it up.
+  postInstall = ''
+    rm -r $out/nix
+  '';
+
+  meta = with lib; {
+    description = "oneAPI Deep Neural Network Library (oneDNN)";
+    homepage = "https://01.org/dnnl";
+    changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${version}";
+    license = licenses.asl20;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ alexarice bhipple ];
+  };
+}