python312Packages.mypy: 1.11.2 -> 1.13.0

This commit is contained in:
aucub
2024-11-11 05:16:50 +08:00
parent 76612b17c0
commit eaff3f2207

View File

@@ -3,7 +3,6 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
gitUpdater,
pythonAtLeast,
pythonOlder,
@@ -33,28 +32,18 @@
buildPythonPackage rec {
pname = "mypy";
version = "1.11.2";
version = "1.13.0";
pyproject = true;
# mypy doesn't support python313 yet
# https://github.com/python/mypy/issues/17264
disabled = pythonOlder "3.8" || pythonAtLeast "3.13";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "python";
repo = "mypy";
rev = "refs/tags/v${version}";
hash = "sha256-5gfqIBtI/G5HARYdXHjYNYNRxeNgrk9dnpSgvMSu9bw=";
hash = "sha256-P2Ozmj7/7QBmjlveHLsNdYgUAerg0qOoa8pO0iQc5os=";
};
patches = [
(fetchpatch2 {
name = "python3.12.7-compat.patch";
url = "https://github.com/python/mypy/commit/1a2c8e2a4df21532e4952191cad74ae50083f4ad.patch";
hash = "sha256-GBQPTkdoLeErjbRUjZBFEwvCcN/WzC3OYVvou6M+f80=";
})
];
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
@@ -140,12 +129,12 @@ buildPythonPackage rec {
inherit (nixosTests) nixos-test-driver;
};
meta = with lib; {
meta = {
description = "Optional static typing for Python";
homepage = "https://www.mypy-lang.org";
changelog = "https://github.com/python/mypy/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
license = lib.licenses.mit;
mainProgram = "mypy";
maintainers = with maintainers; [ lnl7 ];
maintainers = with lib.maintainers; [ lnl7 ];
};
}