python3Packages.numba: use finalAttrs pattern
This commit is contained in:
committed by
Martin Weinelt
parent
a3c07c7478
commit
73bdcf7dc9
@@ -32,7 +32,7 @@
|
||||
let
|
||||
cudatoolkit = cudaPackages.cuda_nvcc;
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
version = "0.63.1";
|
||||
pname = "numba";
|
||||
pyproject = true;
|
||||
@@ -40,14 +40,14 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "numba";
|
||||
repo = "numba";
|
||||
tag = version;
|
||||
tag = finalAttrs.version;
|
||||
# Upstream uses .gitattributes to inject information about the revision
|
||||
# hash and the refname into `numba/_version.py`, see:
|
||||
#
|
||||
# - https://git-scm.com/docs/gitattributes#_export_subst and
|
||||
# - https://github.com/numba/numba/blame/5ef7c86f76a6e8cc90e9486487294e0c34024797/numba/_version.py#L25-L31
|
||||
postFetch = ''
|
||||
sed -i 's/git_refnames = "[^"]*"/git_refnames = " (tag: ${src.tag})"/' $out/numba/_version.py
|
||||
sed -i 's/git_refnames = "[^"]*"/git_refnames = " (tag: ${finalAttrs.src.tag})"/' $out/numba/_version.py
|
||||
'';
|
||||
hash = "sha256-M7Hdc1Qakclz7i/HujBUqVEWFsHj9ZGQDzb8Ze9AztA=";
|
||||
};
|
||||
@@ -147,10 +147,10 @@ buildPythonPackage rec {
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://numba.readthedocs.io/en/stable/release/${version}-notes.html";
|
||||
changelog = "https://numba.readthedocs.io/en/stable/release/${finalAttrs.version}-notes.html";
|
||||
description = "Compiling Python code using LLVM";
|
||||
homepage = "https://numba.pydata.org/";
|
||||
license = lib.licenses.bsd2;
|
||||
mainProgram = "numba";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user