at 23.11-beta 1.1 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, future 6, ipython 7, numpy 8, pyserial 9, pyusb 10, pytestCheckHook 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "rfcat"; 16 version = "2.0.1"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "atlas0fd00m"; 23 repo = "rfcat"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-hdRsVbDXRC1EOhBoFJ9T5ZE6hwOgDWSdN5sIpxJ0x3E="; 26 }; 27 28 propagatedBuildInputs = [ 29 future 30 ipython 31 numpy 32 pyserial 33 pyusb 34 ]; 35 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 ''; 40 41 nativeCheckInputs = [ 42 pytestCheckHook 43 ]; 44 45 pythonImportsCheck = [ 46 "rflib" 47 ]; 48 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 }; 56}