2021-04-23 04:20:22 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-10-17 12:30:14 +02:00
|
|
|
, environs
|
2021-04-23 04:20:22 +02:00
|
|
|
, fetchFromGitHub
|
2021-09-20 09:20:07 +02:00
|
|
|
, poetry-core
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-vcr
|
|
|
|
, pytestCheckHook
|
2021-04-23 04:20:22 +02:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, tornado
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "deezer-python";
|
2021-12-12 05:51:30 +01:00
|
|
|
version = "4.2.1";
|
2021-04-23 04:20:22 +02:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-09-20 09:20:07 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-04-23 04:20:22 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "browniebroke";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-12 05:51:30 +01:00
|
|
|
sha256 = "0gl0l7x9zqfkz3l4jfz8rb956lqj3vx1aghric36izwzl6wyj6h5";
|
2021-04-23 04:20:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-10-17 12:30:14 +02:00
|
|
|
environs
|
2021-09-20 09:20:07 +02:00
|
|
|
pytest-mock
|
2021-10-17 12:30:14 +02:00
|
|
|
pytest-vcr
|
|
|
|
pytestCheckHook
|
2021-04-23 04:20:22 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
tornado
|
|
|
|
];
|
|
|
|
|
2021-09-20 09:20:07 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=deezer" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "deezer" ];
|
|
|
|
|
2021-04-23 04:20:22 +02:00
|
|
|
meta = with lib; {
|
2021-10-17 12:30:14 +02:00
|
|
|
description = "Python wrapper around the Deezer API";
|
2021-04-23 04:20:22 +02:00
|
|
|
homepage = "https://github.com/browniebroke/deezer-python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ synthetica ];
|
|
|
|
};
|
|
|
|
}
|