3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/rfcat/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
, stdenv
, buildPythonPackage
, fetchFromGitHub
, future
, ipython
, numpy
, pyserial
, pyusb
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "rfcat";
version = "1.9.7";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "atlas0fd00m";
repo = "rfcat";
rev = "refs/tags/v${version}";
hash = "sha256-VOLA/ZZLazW7u0VYkAHzDh4aaHGr3u09bKVOkhYk6Fk=";
};
propagatedBuildInputs = [
future
ipython
numpy
pyserial
pyusb
];
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/etc/udev/rules.d
cp etc/udev/rules.d/20-rfcat.rules $out/etc/udev/rules.d
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"rflib"
];
meta = with lib; {
description = "Swiss Army knife of sub-GHz ISM band radio";
homepage = "https://github.com/atlas0fd00m/rfcat";
license = licenses.bsd3;
maintainers = with maintainers; [ trepetti ];
changelog = "https://github.com/atlas0fd00m/rfcat/releases/tag/v${version}";
};
}