nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 future,
7 ipython,
8 numpy,
9 pyserial,
10 pyusb,
11 pytestCheckHook,
12 udevCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "rfcat";
17 version = "2.0.1";
18 format = "setuptools";
19
20 src = fetchFromGitHub {
21 owner = "atlas0fd00m";
22 repo = "rfcat";
23 tag = "v${version}";
24 hash = "sha256-hdRsVbDXRC1EOhBoFJ9T5ZE6hwOgDWSdN5sIpxJ0x3E=";
25 };
26
27 propagatedBuildInputs = [
28 future
29 ipython
30 numpy
31 pyserial
32 pyusb
33 ];
34
35 nativeBuildInputs = [
36 udevCheckHook
37 ];
38
39 postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
40 mkdir -p $out/etc/udev/rules.d
41 cp etc/udev/rules.d/20-rfcat.rules $out/etc/udev/rules.d
42 '';
43
44 nativeCheckInputs = [ pytestCheckHook ];
45
46 pythonImportsCheck = [ "rflib" ];
47
48 meta = {
49 description = "Swiss Army knife of sub-GHz ISM band radio";
50 homepage = "https://github.com/atlas0fd00m/rfcat";
51 license = lib.licenses.bsd3;
52 maintainers = with lib.maintainers; [ trepetti ];
53 changelog = "https://github.com/atlas0fd00m/rfcat/releases/tag/v${version}";
54 };
55}