nixpkgs/pkgs/development/python-modules/tailscale/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

63 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 ];
};
}