2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-07-18 16:06:22 +00:00
|
|
|
, pythonOlder
|
2020-06-15 15:56:04 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, appdirs
|
2020-07-18 16:06:22 +00:00
|
|
|
, importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
|
|
|
, pytest
|
2020-09-25 04:45:31 +00:00
|
|
|
, wheel
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pipdate";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "0.5.2";
|
2020-09-25 04:45:31 +00:00
|
|
|
format = "pyproject";
|
2020-06-15 15:56:04 +00:00
|
|
|
disabled = isPy27; # abandoned
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "507065231f2d50b6319d483432cba82aadad78be21b7a2969b5881ed8dee9ab4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ wheel ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
requests
|
2020-07-18 16:06:22 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
HOME=$(mktemp -d) pytest test/test_pipdate.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# tests require network access
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "pip update helpers";
|
|
|
|
homepage = "https://github.com/nschloe/pipdate";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|