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