nav: init at 1.2.1 (#356071)
[NixPkgs.git] / pkgs / development / python-modules / rfcat / default.nix
blob4112e826f7e49c2b711a27aaba34b56a4fa31bd2
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   future,
7   ipython,
8   numpy,
9   pyserial,
10   pyusb,
11   pytestCheckHook,
12   pythonOlder,
15 buildPythonPackage rec {
16   pname = "rfcat";
17   version = "2.0.1";
18   format = "setuptools";
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "atlas0fd00m";
24     repo = "rfcat";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-hdRsVbDXRC1EOhBoFJ9T5ZE6hwOgDWSdN5sIpxJ0x3E=";
27   };
29   propagatedBuildInputs = [
30     future
31     ipython
32     numpy
33     pyserial
34     pyusb
35   ];
37   postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
38     mkdir -p $out/etc/udev/rules.d
39     cp etc/udev/rules.d/20-rfcat.rules $out/etc/udev/rules.d
40   '';
42   nativeCheckInputs = [ pytestCheckHook ];
44   pythonImportsCheck = [ "rflib" ];
46   meta = with lib; {
47     description = "Swiss Army knife of sub-GHz ISM band radio";
48     homepage = "https://github.com/atlas0fd00m/rfcat";
49     license = licenses.bsd3;
50     maintainers = with maintainers; [ trepetti ];
51     changelog = "https://github.com/atlas0fd00m/rfcat/releases/tag/v${version}";
52   };