Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / oneDNN / 2.nix
blob8851b09214f1fdec307098b0e4121fd7dfdcea68
1 { cmake
2 , fetchFromGitHub
3 , lib
4 , stdenv
5 }:
7 # This was originally called mkl-dnn, then it was renamed to dnnl, and it has
8 # just recently been renamed again to oneDNN. See here for details:
9 # https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn
10 stdenv.mkDerivation (finalAttrs: {
11   pname = "oneDNN";
12   version = "2.7.5";
14   src = fetchFromGitHub {
15     owner = "oneapi-src";
16     repo = "oneDNN";
17     rev = "v${finalAttrs.version}";
18     sha256 = "sha256-oMPBORAdL2rk2ewyUrInYVHYBRvuvNX4p4rwykO3Rhs=";
19   };
21   outputs = [ "out" "dev" "doc" ];
23   nativeBuildInputs = [ cmake ];
25   # Tests fail on some Hydra builders, because they do not support SSE4.2.
26   doCheck = false;
28   # Fixup bad cmake paths
29   postInstall = ''
30     substituteInPlace $out/lib/cmake/dnnl/dnnl-config.cmake \
31       --replace "\''${PACKAGE_PREFIX_DIR}/" ""
33     substituteInPlace $out/lib/cmake/dnnl/dnnl-targets.cmake \
34       --replace "\''${_IMPORT_PREFIX}/" ""
35   '';
37   meta = {
38     changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}";
39     description = "oneAPI Deep Neural Network Library (oneDNN)";
40     homepage = "https://01.org/oneDNN";
41     license = lib.licenses.asl20;
42     maintainers = with lib.maintainers; [ alexarice bhipple ];
43     platforms = lib.platforms.all;
44   };