2019-05-20 16:54:11 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-07-04 17:03:58 +02:00
|
|
|
, pythonOlder
|
2020-06-16 23:11:10 +02:00
|
|
|
, isPy27
|
2019-05-20 16:54:11 +02:00
|
|
|
, appdirs
|
2020-07-04 17:03:58 +02:00
|
|
|
, importlib-metadata
|
2019-05-20 16:54:11 +02:00
|
|
|
, requests
|
|
|
|
, pytest
|
2020-08-18 10:37:33 +02:00
|
|
|
, wheel
|
2019-05-20 16:54:11 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pipdate";
|
2020-07-31 10:56:43 +02:00
|
|
|
version = "0.5.2";
|
2020-08-18 10:37:33 +02:00
|
|
|
format = "pyproject";
|
2020-06-16 23:11:10 +02:00
|
|
|
disabled = isPy27; # abandoned
|
2019-05-20 16:54:11 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-31 10:56:43 +02:00
|
|
|
sha256 = "507065231f2d50b6319d483432cba82aadad78be21b7a2969b5881ed8dee9ab4";
|
2019-05-20 16:54:11 +02:00
|
|
|
};
|
|
|
|
|
2020-08-18 10:37:33 +02:00
|
|
|
nativeBuildInputs = [ wheel ];
|
|
|
|
|
2019-05-20 16:54:11 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
requests
|
2020-07-04 17:03:58 +02:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2019-05-20 16:54:11 +02: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";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/nschloe/pipdate";
|
2019-05-20 16:54:11 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|