at 23.05-pre 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, future 5, ipython 6, numpy 7, pyserial 8, pyusb 9, hostPlatform 10, pytestCheckHook 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "rfcat"; 16 version = "1.9.6"; 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-7iYz7YY9zpnJmLfCmp/sF21eZ21HMGq2sLQIENxbr34="; 26 }; 27 28 propagatedBuildInputs = [ 29 future 30 ipython 31 numpy 32 pyserial 33 pyusb 34 ]; 35 36 postInstall = lib.optionalString 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 checkInputs = [ 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}