depot/third_party/nixpkgs/pkgs/development/python-modules/tailscale/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

62 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pydantic
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, yarl
}:
buildPythonPackage rec {
pname = "tailscale";
version = "0.3.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-tailscale";
rev = "refs/tags/v${version}";
hash = "sha256-gGDsVGsCBZi/pxD0cyH3+xrvHVBC+wJCcl/NGqsTqiE=";
};
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace "0.0.0" "${version}" \
--replace "--cov" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
pydantic
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [
"tailscale"
];
meta = with lib; {
description = "Python client for the Tailscale API";
homepage = "https://github.com/frenck/python-tailscale";
changelog = "https://github.com/frenck/python-tailscale/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}