nixpkgs/pkgs/development/python-modules/bluetooth-auto-recovery/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

59 lines
1.2 KiB
Nix

{ lib
, async-timeout
, btsocket
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pyric
, pytestCheckHook
, pythonOlder
, usb-devices
}:
buildPythonPackage rec {
pname = "bluetooth-auto-recovery";
version = "1.0.3";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-gDypj2Vud6JtbGREPotvawgcsu5hbf92gJxxutWHcII=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
async-timeout
btsocket
pyric
usb-devices
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=bluetooth_auto_recovery --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"bluetooth_auto_recovery"
];
meta = with lib; {
description = "Library for recovering Bluetooth adapters";
homepage = "https://github.com/Bluetooth-Devices/bluetooth-auto-recovery";
changelog = "https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}