depot/third_party/nixpkgs/pkgs/development/python-modules/tailscale/default.nix
Default email 3cbfd2b52c Project import generated by Copybara.
GitOrigin-RevId: 395879c28386e1abf20c7ecacd45880759548391
2021-12-18 20:06:50 -05:00

61 lines
1.1 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pydantic
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, yarl
}:
buildPythonPackage rec {
pname = "tailscale";
version = "0.1.5";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-tailscale";
rev = "v${version}";
sha256 = "1a33xibkbavl442sc7phvj6d6w17x91zh64f59w0xrsccabn25b1";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
pydantic
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 = [
"tailscale"
];
meta = with lib; {
description = "Python client for the Tailscale API";
homepage = "https://github.com/frenck/python-tailscale";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}