1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
53 lines
1.0 KiB
Nix
53 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
pyusb,
|
|
influxdb-client,
|
|
pyserial,
|
|
pytestCheckHook,
|
|
udevCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "openant-unstable";
|
|
version = "1.3.1";
|
|
pyproject = true;
|
|
|
|
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;
|
|
};
|
|
}
|