2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
, setuptools
|
|
|
|
, urllib3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tank-utility";
|
|
|
|
version = "1.4.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "krismolendyke";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-2cxAaSyreIzQzCUtiolEV7JbGFKL8Mob3337J0jlMsU=";
|
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
# urllib3[secure] is not picked-up
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "urllib3[secure]" "urllib3"
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
urllib3
|
|
|
|
setuptools
|
|
|
|
] ++ urllib3.optional-dependencies.secure;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2022-11-02 22:02:43 +00:00
|
|
|
responses
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"tank_utility"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for the Tank Utility API";
|
|
|
|
homepage = "https://github.com/krismolendyke/tank-utility";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|