summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyhibp/default.nix
blob: 7b60f7b7d6f0bac7235416b25c7ac744eda2e3e1 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitLab,
  setuptools,
  requests,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pyhibp";
  version = "4.2.0";
  pyproject = true;

  src = fetchFromGitLab {
    group = "kitsunix";
    owner = "pyHIBP";
    repo = "pyHIBP";
    tag = "v${version}";
    hash = "sha256-2LJA989hpG5X6o+zCTSU0RRd0Z4zd29RAtp/jBW8Clo=";
  };

  build-system = [ setuptools ];

  dependencies = [ requests ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    # All require internet access
    "TestIsPasswordBreached"
    "TestSuffixSearch"
    "TestGetAllBreaches"
    "TestGetSingleBreach"
    "TestGetDataClasses"
  ];

  pythonImportsCheck = [ "pyhibp" ];

  meta = {
    description = "Python interface to Troy Hunt's 'Have I Been Pwned?' public API";
    homepage = "https://gitlab.com/kitsunix/pyHIBP/pyHIBP";
    license = lib.licenses.agpl3Plus;
    maintainers = with lib.maintainers; [ aleksana ];
  };
}