2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-10-17 09:34:42 +00:00
|
|
|
, environs
|
2021-04-25 03:57:28 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-22 15:38:15 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-vcr
|
|
|
|
, pytestCheckHook
|
2021-04-25 03:57:28 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, tornado
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "deezer-python";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "5.3.2";
|
2021-04-25 03:57:28 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "browniebroke";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-lOVHSYL57hwzvdC+pJFDkDGFuu29jdZ36BYscw82uDE=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-10-17 09:34:42 +00:00
|
|
|
environs
|
2021-09-22 15:38:15 +00:00
|
|
|
pytest-mock
|
2021-10-17 09:34:42 +00:00
|
|
|
pytest-vcr
|
|
|
|
pytestCheckHook
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
tornado
|
|
|
|
];
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=deezer" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "deezer" ];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
meta = with lib; {
|
2021-10-17 09:34:42 +00:00
|
|
|
description = "Python wrapper around the Deezer API";
|
2021-04-25 03:57:28 +00:00
|
|
|
homepage = "https://github.com/browniebroke/deezer-python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ synthetica ];
|
|
|
|
};
|
|
|
|
}
|