depot/third_party/nixpkgs/pkgs/development/python-modules/ambee/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

56 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiohttp
, poetry-core
, yarl
, aresponses
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "ambee";
version = "0.3.0";
disabled = pythonOlder "3.8";
format = "pyproject";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-ambee";
rev = "v${version}";
sha256 = "0vivzpfsmb4gy7k5wlbk5ylkpqy4jhki9lbgxyrrqj5yhhzz6cwy";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
yarl
];
checkInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace "0.0.0" "${version}" \
--replace "--cov" ""
'';
pythonImportsCheck = [ "ambee" ];
meta = with lib; {
description = "Python client for Ambee API";
homepage = "https://github.com/frenck/python-ambee";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}