2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
packaging,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-mock,
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "luddite";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.0.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jumptrading";
|
|
|
|
repo = pname;
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-iJ3h1XRBzLd4cBKFPNOlIV5Z5XJ/miscfIdkpPIpbJ8=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
2024-01-02 11:29:13 +00:00
|
|
|
--replace "--cov=luddite --cov-report=html --cov-report=term --no-cov-on-fail" "" \
|
|
|
|
--replace "--disable-socket" ""
|
2021-08-05 21:33:18 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ packaging ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "luddite" ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Checks for out-of-date package versions";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "luddite";
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://github.com/jumptrading/luddite";
|
|
|
|
license = licenses.asl20;
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
}
|