about summary refs log tree commit diff
path: root/pkgs/development/python-modules/defusedxml/default.nix
blob: ce997d1fcb820cb0b08a516edf7abb398a088490 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  lxml,
  python,
}:

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

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

  build-system = [ setuptools ] ;

  nativeCheckInputs = [ lxml ];

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

  pythonImportsCheck = [ "defusedxml" ];

  meta = with lib; {
    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 = licenses.psfl;
    maintainers = with maintainers; [ fab ];
  };
}