From ccf92769e9e1fc6557c4d57f5c9afb51aa1f07f4 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 16 Aug 2023 17:17:17 +0200 Subject: [PATCH] oneDNN_2: use `finalAttrs` pattern --- pkgs/development/libraries/oneDNN/2.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/oneDNN/2.nix b/pkgs/development/libraries/oneDNN/2.nix index f872dd468b6e..8851b09214f1 100644 --- a/pkgs/development/libraries/oneDNN/2.nix +++ b/pkgs/development/libraries/oneDNN/2.nix @@ -1,16 +1,20 @@ -{ stdenv, lib, fetchFromGitHub, cmake }: +{ cmake +, fetchFromGitHub +, lib +, stdenv +}: # 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 { +stdenv.mkDerivation (finalAttrs: { pname = "oneDNN"; version = "2.7.5"; src = fetchFromGitHub { owner = "oneapi-src"; repo = "oneDNN"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-oMPBORAdL2rk2ewyUrInYVHYBRvuvNX4p4rwykO3Rhs="; }; @@ -30,12 +34,12 @@ stdenv.mkDerivation rec { --replace "\''${_IMPORT_PREFIX}/" "" ''; - meta = with lib; { + meta = { + changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}"; description = "oneAPI Deep Neural Network Library (oneDNN)"; homepage = "https://01.org/oneDNN"; - changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${version}"; - license = licenses.asl20; - platforms = platforms.all; - maintainers = with maintainers; [ alexarice bhipple ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ alexarice bhipple ]; + platforms = lib.platforms.all; }; -} +})