nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, fetchPypi
3, buildPythonPackage
4, pytestCheckHook
5, libxslt
6, libxml2
7, libtool
8, pkg-config
9, xmlsec
10, pkgconfig
11, setuptools-scm
12, lxml
13, hypothesis
14}:
15
16buildPythonPackage rec {
17 pname = "xmlsec";
18 version = "1.3.12";
19 format = "pyproject";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "2c86ac6ce570c9e04f04da0cd5e7d3db346e4b5b1d006311606368f17c756ef9";
24 };
25
26 # https://github.com/mehcode/python-xmlsec/issues/84#issuecomment-632930116
27 patches = [
28 ./reset-lxml-in-tests.patch
29 ];
30
31 nativeBuildInputs = [ pkg-config pkgconfig setuptools-scm ];
32
33 buildInputs = [ xmlsec libxslt libxml2 libtool ];
34
35 propagatedBuildInputs = [ lxml ];
36
37 # Full git clone required for test_doc_examples
38 checkInputs = [ pytestCheckHook hypothesis ];
39
40 disabledTestPaths = [
41 "tests/test_doc_examples.py"
42 # test_reinitialize_module segfaults python
43 # https://github.com/mehcode/python-xmlsec/issues/203
44 "tests/test_xmlsec.py"
45 ];
46
47
48 pythonImportsCheck = [ "xmlsec" ];
49
50 meta = with lib; {
51 description = "Python bindings for the XML Security Library";
52 homepage = "https://github.com/mehcode/python-xmlsec";
53 license = licenses.mit;
54 maintainers = with maintainers; [ zhaofengli ];
55 };
56}