1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 packaging,
7 pytestCheckHook,
8 pytest-mock,
9}:
10
11buildPythonPackage rec {
12 pname = "luddite";
13 version = "1.0.4";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "jumptrading";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-iJ3h1XRBzLd4cBKFPNOlIV5Z5XJ/miscfIdkpPIpbJ8=";
21 };
22
23 postPatch = ''
24 substituteInPlace pytest.ini \
25 --replace "--cov=luddite --cov-report=html --cov-report=term --no-cov-on-fail" "" \
26 --replace "--disable-socket" ""
27 '';
28
29 nativeBuildInputs = [ setuptools ];
30
31 propagatedBuildInputs = [ packaging ];
32
33 pythonImportsCheck = [ "luddite" ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 pytest-mock
38 ];
39
40 meta = with lib; {
41 description = "Checks for out-of-date package versions";
42 mainProgram = "luddite";
43 homepage = "https://github.com/jumptrading/luddite";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ emilytrau ];
46 };
47}