linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / rfcat / default.nix
blob7bb390e79a22be5fa6b8d45033ca7bd381dd72e5
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , future
5 , ipython
6 , numpy
7 , pyserial
8 , pyusb
9 , hostPlatform
10 , pytestCheckHook
13 buildPythonPackage rec {
14   pname = "rfcat";
15   version = "1.9.5";
17   src = fetchFromGitHub {
18     owner = "atlas0fd00m";
19     repo = "rfcat";
20     rev = "v${version}";
21     sha256 = "1mmr7g7ma70sk6vl851430nqnd7zxsk7yb0xngwrdx9z7fbz2ck0";
22   };
24   propagatedBuildInputs = [
25     future
26     ipython
27     numpy
28     pyserial
29     pyusb
30   ];
32   postInstall = lib.optionalString hostPlatform.isLinux ''
33     mkdir -p $out/etc/udev/rules.d
34     cp etc/udev/rules.d/20-rfcat.rules $out/etc/udev/rules.d
35   '';
37   checkInputs = [
38     pytestCheckHook
39   ];
41   pythonImportsCheck = [ "rflib" ];
43   meta = with lib; {
44     description = "Swiss Army knife of sub-GHz ISM band radio";
45     homepage = "https://github.com/atlas0fd00m/rfcat";
46     license = licenses.bsd3;
47     maintainers = with maintainers; [ trepetti ];
48     changelog = "https://github.com/atlas0fd00m/rfcat/releases/tag/v${version}";
49   };