python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / asn1crypto / default.nix
blob4fb33a866a609d751b6984848455357a5ef5c502
2   lib,
3   buildPythonPackage,
4   python,
5   fetchFromGitHub,
7   # build system
8   setuptools,
10   # tests
11   pytestCheckHook,
14 # Switch version based on python version, as the situation isn't easy:
15 #   https://github.com/wbond/asn1crypto/issues/269
16 #   https://github.com/MatthiasValvekens/certomancer/issues/12
17 let
18   provenance =
19     if lib.versionOlder python.version "3.12" then
20       rec {
21         version = "1.5.1";
22         rev = version;
23         hash = "sha256-M8vASxhaJPgkiTrAckxz7gk/QHkrFlNz7fFbnLEBT+M=";
24       }
25     else
26       {
27         version = "1.5.1-unstable-2023-11-03";
28         rev = "b763a757bb2bef2ab63620611ddd8006d5e9e4a2";
29         hash = "sha256-11WajEDtisiJsKQjZMSd5sDog3DuuBzf1PcgSY+uuXY=";
30       };
33 buildPythonPackage rec {
34   pname = "asn1crypto";
35   pyproject = true;
36   inherit (provenance) version;
38   # Pulling from Github to run tests
39   src = fetchFromGitHub {
40     owner = "wbond";
41     repo = "asn1crypto";
42     inherit (provenance) rev hash;
43   };
45   nativeBuildInputs = [ setuptools ];
47   nativeCheckInputs = [ pytestCheckHook ];
49   meta = {
50     description = "Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP";
51     license = lib.licenses.mit;
52     homepage = "https://github.com/wbond/asn1crypto";
53     maintainers = with lib.maintainers; [ dotlambda ];
54   };