summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/defusedxml/default.nix
blob: 693f40ae4a674e022da7345678e32016c5e019ae (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  lxml,
  python,
}:

buildPythonPackage rec {
  pname = "defusedxml";
  version = "0.8.0rc2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "tiran";
    repo = "defusedxml";
    tag = "v${version}";
    hash = "sha256-X88A5V9uXP3wJQ+olK6pZJT66LP2uCXLK8goa5bPARA=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [ lxml ];

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} tests.py
    runHook postCheck
  '';

  pythonImportsCheck = [ "defusedxml" ];

  meta = {
    changelog = "https://github.com/tiran/defusedxml/blob/v${version}/CHANGES.txt";
    description = "Python module to defuse XML issues";
    homepage = "https://github.com/tiran/defusedxml";
    license = lib.licenses.psfl;
    maintainers = with lib.maintainers; [ fab ];
  };
}