summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyasn1-modules/default.nix
blob: 32214d54a1a4834a962931145da254b5f00dd6c1 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  setuptools,
  pyasn1,
  pytestCheckHook,
  pythonOlder,
}:

buildPythonPackage rec {
  pname = "pyasn1-modules";
  version = "0.4.1";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "pyasn1";
    repo = "pyasn1-modules";
    tag = "v${version}";
    hash = "sha256-7tCmhADC8LuswonL4QQ01/DD0RzeRLFJrsU49On4fqY=";
  };

  patches = [
    # Stop using pyasn1.compat.octets, https://github.com/pyasn1/pyasn1-modules/pull/22
    (fetchpatch {
      name = "pyasn1-compat.patch";
      url = "https://github.com/pyasn1/pyasn1-modules/commit/079c176eb00ed7352c9696efa12a0577beeecd71.patch";
      hash = "sha256-k/7P0RnhK57BUFZFFBDyFvroFF9lhonNhD/XXNGoiMk=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [ pyasn1 ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pyasn1_modules" ];

  meta = {
    description = "Collection of ASN.1-based protocols modules";
    homepage = "https://pyasn1.readthedocs.io";
    changelog = "https://github.com/pyasn1/pyasn1-modules/releases/tag/v${version}";
    license = lib.licenses.bsd2;
    maintainers = [ ];
  };
}