nixpkgs/pkgs/development/python-modules/ld2410-ble/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

57 lines
1.1 KiB
Nix

{ lib
, async-timeout
, bleak
, bleak-retry-connector
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "ld2410-ble";
version = "0.1.1";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "930913";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-D8Z3OXlXWsaN0Ck9gx//J9TCaQmirYDbaXK7aTpI7ns=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
async-timeout
bleak
bleak-retry-connector
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=ld2410_ble --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"ld2410_ble"
];
meta = with lib; {
description = "Library for the LD2410B modules from HiLinks";
homepage = "https://github.com/930913/ld2410-ble";
changelog = "https://github.com/930913/ld2410-ble/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}