about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/xmlsec/default.nix
blob: b8c60f1b64253841bbd4b7fd3bdb9c9eb02f2001 (plain) (blame)
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
{ lib
, fetchPypi
, buildPythonPackage
, pytestCheckHook
, libxslt
, libxml2
, libtool
, pkg-config
, xmlsec
, pkgconfig
, setuptools-scm
, toml
, lxml
, hypothesis
}:

buildPythonPackage rec {
  pname = "xmlsec";
  version = "1.3.11";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-zS6q/38xeEoH3ZnOgfp2cxPfO6GDT6pBQ+4sBwAMrHo=";
  };

  # https://github.com/mehcode/python-xmlsec/issues/84#issuecomment-632930116
  patches = [
    ./reset-lxml-in-tests.patch
  ];

  nativeBuildInputs = [ pkg-config pkgconfig setuptools-scm toml ];

  buildInputs = [ xmlsec libxslt libxml2 libtool ];

  propagatedBuildInputs = [ lxml ];

  # Full git clone required for test_doc_examples
  checkInputs = [ pytestCheckHook hypothesis ];
  disabledTestPaths = [ "tests/test_doc_examples.py" ];

  pythonImportsCheck = [ "xmlsec" ];

  meta = with lib; {
    description = "Python bindings for the XML Security Library";
    homepage = "https://github.com/mehcode/python-xmlsec";
    license = licenses.mit;
    maintainers = with maintainers; [ zhaofengli ];
  };
}