Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / rfcat / default.nix
blob9ee83c5fa7286675ec6396fd4207acb7d3485fff
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , future
6 , ipython
7 , numpy
8 , pyserial
9 , pyusb
10 , pytestCheckHook
11 , pythonOlder
14 buildPythonPackage rec {
15   pname = "rfcat";
16   version = "2.0.1";
17   format = "setuptools";
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "atlas0fd00m";
23     repo = "rfcat";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-hdRsVbDXRC1EOhBoFJ9T5ZE6hwOgDWSdN5sIpxJ0x3E=";
26   };
28   propagatedBuildInputs = [
29     future
30     ipython
31     numpy
32     pyserial
33     pyusb
34   ];
36   postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
37     mkdir -p $out/etc/udev/rules.d
38     cp etc/udev/rules.d/20-rfcat.rules $out/etc/udev/rules.d
39   '';
41   nativeCheckInputs = [
42     pytestCheckHook
43   ];
45   pythonImportsCheck = [
46     "rflib"
47   ];
49   meta = with lib; {
50     description = "Swiss Army knife of sub-GHz ISM band radio";
51     homepage = "https://github.com/atlas0fd00m/rfcat";
52     license = licenses.bsd3;
53     maintainers = with maintainers; [ trepetti ];
54     changelog = "https://github.com/atlas0fd00m/rfcat/releases/tag/v${version}";
55   };