Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 future, 7 ipython, 8 numpy, 9 pyserial, 10 pyusb, 11 pytestCheckHook, 12 pythonOlder, 13}: 14 15buildPythonPackage rec { 16 pname = "rfcat"; 17 version = "2.0.1"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "atlas0fd00m"; 24 repo = "rfcat"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-hdRsVbDXRC1EOhBoFJ9T5ZE6hwOgDWSdN5sIpxJ0x3E="; 27 }; 28 29 propagatedBuildInputs = [ 30 future 31 ipython 32 numpy 33 pyserial 34 pyusb 35 ]; 36 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 ''; 41 42 nativeCheckInputs = [ pytestCheckHook ]; 43 44 pythonImportsCheck = [ "rflib" ]; 45 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 }; 53}