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
57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
bleak,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
pytestCheckHook,
|
|
requests,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aranet4";
|
|
version = "2.5.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Anrijs";
|
|
repo = "Aranet4-Python";
|
|
tag = "v${version}";
|
|
hash = "sha256-/FBrP4aceIX9dcZmm+k13PSAPuK4SQenjWqOAFPSvL8=";
|
|
};
|
|
|
|
patches = [
|
|
# https://github.com/Anrijs/Aranet4-Python/pull/62
|
|
(fetchpatch {
|
|
name = "fix-for-failing-test-with-bleak-1.1.0.patch";
|
|
url = "https://github.com/Anrijs/Aranet4-Python/pull/62/commits/0117633682050c77cd00ead1bce93375367d7a3c.patch";
|
|
hash = "sha256-S4Di6bKbapCpDdOIy4sSiG9dO7OZq5ixjjK+ux4EEp0=";
|
|
})
|
|
];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
bleak
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "aranet4" ];
|
|
|
|
disabledTests = [
|
|
# Test compares rendered output
|
|
"test_current_values"
|
|
];
|
|
|
|
meta = {
|
|
description = "Module to interact with Aranet4 devices";
|
|
homepage = "https://github.com/Anrijs/Aranet4-Python";
|
|
license = with lib.licenses; [ mit ];
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
mainProgram = "aranetctl";
|
|
};
|
|
}
|