depot/third_party/nixpkgs/pkgs/development/python-modules/pylitterbot/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

66 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pyjwt
, pytest-aiohttp
, pytest-freezegun
, pytestCheckHook
, pythonOlder
, deepdiff
}:
buildPythonPackage rec {
pname = "pylitterbot";
version = "2022.10.1";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "natekspencer";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-E7rBRPtXa/E6jf75zULuGaiu2DHvq4hZjcwPwj/w9ww=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
deepdiff
pyjwt
];
checkInputs = [
aioresponses
pytest-aiohttp
pytest-freezegun
pytestCheckHook
];
postPatch = ''
# https://github.com/natekspencer/pylitterbot/issues/73
substituteInPlace pyproject.toml \
--replace 'deepdiff = "^5.8.1"' 'deepdiff = ">=5.8.1"'
'';
pytestFlagsArray = [
"--asyncio-mode=legacy"
];
pythonImportsCheck = [
"pylitterbot"
];
meta = with lib; {
description = "Modulefor controlling a Litter-Robot";
homepage = "https://github.com/natekspencer/pylitterbot";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}