depot/third_party/nixpkgs/pkgs/development/python-modules/tololib/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

46 lines
1 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitLab,
pytestCheckHook,
pythonOlder,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "tololib";
version = "1.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitLab {
owner = "MatthiasLohr";
repo = "tololib";
rev = "refs/tags/v${version}";
hash = "sha256-TxWKV2nrnCxZmj6+wBDMSdJRvKV+MsPFbOyIlUJYJ3Q=";
};
build-system = [ setuptools-scm ];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
export PATH="$PATH:$out/bin";
'';
pythonImportsCheck = [ "tololib" ];
# Network discovery doesn't work in the sandbox for darwin
doCheck = !stdenv.hostPlatform.isDarwin;
meta = with lib; {
description = "Python Library for Controlling TOLO Sauna/Steam Bath Devices";
homepage = "https://gitlab.com/MatthiasLohr/tololib";
changelog = "https://gitlab.com/MatthiasLohr/tololib/-/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
mainProgram = "tolo-cli";
};
}