567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
56 lines
1.1 KiB
Nix
56 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
setuptools,
|
|
pyusb,
|
|
influxdb-client,
|
|
pyserial,
|
|
pytestCheckHook,
|
|
udevCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "openant-unstable";
|
|
version = "1.3.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Tigge";
|
|
repo = "openant";
|
|
tag = "v${version}";
|
|
hash = "sha256-wDtHlkVyD7mMDXZ4LGMgatr9sSlQKVbgkYsKvHGr9Pc=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
udevCheckHook
|
|
];
|
|
|
|
postInstall = ''
|
|
install -dm755 "$out/etc/udev/rules.d"
|
|
install -m644 resources/42-ant-usb-sticks.rules "$out/etc/udev/rules.d/99-ant-usb-sticks.rules"
|
|
'';
|
|
|
|
propagatedBuildInputs = [ pyusb ];
|
|
|
|
optional-dependencies = {
|
|
serial = [ pyserial ];
|
|
influx = [ influxdb-client ];
|
|
};
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "openant" ];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/Tigge/openant";
|
|
description = "ANT and ANT-FS Python Library";
|
|
mainProgram = "openant";
|
|
license = lib.licenses.mit;
|
|
};
|
|
}
|