oneDNN: use `finalAttrs` pattern

+14 -10
+14 -10
pkgs/development/libraries/oneDNN/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, cmake }: 1 + { cmake 2 + , fetchFromGitHub 3 + , lib 4 + , stdenv 5 + }: 2 6 3 7 # This was originally called mkl-dnn, then it was renamed to dnnl, and it has 4 8 # just recently been renamed again to oneDNN. See here for details: 5 9 # https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn 6 - stdenv.mkDerivation rec { 10 + stdenv.mkDerivation (finalAttrs: { 7 11 pname = "oneDNN"; 8 12 version = "3.2.1"; 9 13 10 14 src = fetchFromGitHub { 11 15 owner = "oneapi-src"; 12 16 repo = "oneDNN"; 13 - rev = "v${version}"; 14 - sha256 = "sha256-/LbT2nHPpZHjY3xbJ9bDabR7aIMvetNP4mB+rxuTfy8="; 17 + rev = "v${finalAttrs.version}"; 18 + hash = "sha256-/LbT2nHPpZHjY3xbJ9bDabR7aIMvetNP4mB+rxuTfy8="; 15 19 }; 16 20 17 21 outputs = [ "out" "dev" "doc" ]; ··· 30 34 --replace "\''${_IMPORT_PREFIX}/" "" 31 35 ''; 32 36 33 - meta = with lib; { 37 + meta = { 38 + changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}"; 34 39 description = "oneAPI Deep Neural Network Library (oneDNN)"; 35 40 homepage = "https://01.org/oneDNN"; 36 - changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${version}"; 37 - license = licenses.asl20; 38 - platforms = platforms.all; 39 - maintainers = with maintainers; [ bhipple ]; 41 + license = lib.licenses.asl20; 42 + maintainers = with lib.maintainers; [ bhipple ]; 43 + platforms = lib.platforms.all; 40 44 }; 41 - } 45 + })