about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/luddite/default.nix
blob: 4059288da674c14d3c630651ea8e556294eb199e (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
50
51
52
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, packaging
, pytestCheckHook
, pytest-mock
}:

buildPythonPackage rec {
  pname = "luddite";
  version = "1.0.4";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "jumptrading";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-iJ3h1XRBzLd4cBKFPNOlIV5Z5XJ/miscfIdkpPIpbJ8=";
  };

  postPatch = ''
    substituteInPlace pytest.ini \
      --replace "--cov=luddite --cov-report=html --cov-report=term --no-cov-on-fail" "" \
      --replace "--disable-socket" ""
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    packaging
  ];

  pythonImportsCheck = [
    "luddite"
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-mock
  ];

  meta = with lib; {
    description = "Checks for out-of-date package versions";
    mainProgram = "luddite";
    homepage = "https://github.com/jumptrading/luddite";
    license = licenses.asl20;
    maintainers = with maintainers; [ emilytrau ];
  };
}