diff options
author | Vladimír Čunát <v@cunat.cz> | 2024-02-22 09:09:19 +0100 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2024-02-22 09:10:37 +0100 |
commit | 418b5d9e5c316c15f7390cdbacaddd6df4e12c81 (patch) | |
tree | dbd8bd50faf4f359d645cdc22b65ed3a85ea9c5d | |
parent | 024149d718e25378f4decfeeb614b88208c2f700 (diff) |
python312Packages.asn1crypto: 1.5.1 -> 1.5.1-unstable-2023.11.03
while keeping python311Packages.asn1crypto on 1.5.1. See PR #288221
-rw-r--r-- | pkgs/development/python-modules/asn1crypto/default.nix | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/asn1crypto/default.nix b/pkgs/development/python-modules/asn1crypto/default.nix index a9e078b387561..426116f5775a4 100644 --- a/pkgs/development/python-modules/asn1crypto/default.nix +++ b/pkgs/development/python-modules/asn1crypto/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, python , fetchFromGitHub # build system @@ -9,17 +10,31 @@ , pytestCheckHook }: +# Switch version based on python version, as the situation isn't easy: +# https://github.com/wbond/asn1crypto/issues/269 +# https://github.com/MatthiasValvekens/certomancer/issues/12 +with ( + if lib.versionOlder python.version "3.12" then rec { + version = "1.5.1"; + rev = version; + hash = "sha256-M8vASxhaJPgkiTrAckxz7gk/QHkrFlNz7fFbnLEBT+M="; + } else { + version = "1.5.1-unstable-2023-11-03"; + rev = "b763a757bb2bef2ab63620611ddd8006d5e9e4a2"; + hash = "sha256-11WajEDtisiJsKQjZMSd5sDog3DuuBzf1PcgSY+uuXY="; + } +); + buildPythonPackage rec { pname = "asn1crypto"; - version = "1.5.1"; pyproject = true; + inherit version; # Pulling from Github to run tests src = fetchFromGitHub { owner = "wbond"; repo = "asn1crypto"; - rev = version; - hash = "sha256-M8vASxhaJPgkiTrAckxz7gk/QHkrFlNz7fFbnLEBT+M="; + inherit rev hash; }; nativeBuildInputs = [ |