about summary refs log tree commit diff
path: root/pkgs/applications/radio/rtl-sdr
diff options
context:
space:
mode:
authorAlexandre Macabies <web+oss@zopieux.com>2020-08-29 01:28:51 +0200
committerAlexandre Macabies <web+oss@zopieux.com>2020-09-30 20:39:57 +0200
commitf816402fd0b1266d0bf3e7fc028b60da87f7ff5a (patch)
tree0976fd675634334cd2a200912b59cb89d540488d /pkgs/applications/radio/rtl-sdr
parent46a9046f374937ea5118b429f08c79599d2c8ab5 (diff)
rtl-sdr: use hardened udev rules
rtl-sdr latest release 0.6.0 is from 2018. Six months ago master received
a patch[1] to use improved udev rules that chown to plugdev instead of
making the devices world-read-writable.

This change backports [1] as an upstream patch.

[1] https://osmocom.org/projects/rtl-sdr/repository/revisions/b2814731563be4d5a0a68554ece6454a2c63af12
Diffstat (limited to 'pkgs/applications/radio/rtl-sdr')
-rw-r--r--pkgs/applications/radio/rtl-sdr/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/applications/radio/rtl-sdr/default.nix b/pkgs/applications/radio/rtl-sdr/default.nix
index 8fb5154ff7887..7e044296b02cc 100644
--- a/pkgs/applications/radio/rtl-sdr/default.nix
+++ b/pkgs/applications/radio/rtl-sdr/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, cmake, pkgconfig, libusb1 }:
+{ stdenv, fetchgit, fetchpatch, cmake, pkgconfig, libusb1 }:
 
 stdenv.mkDerivation rec {
   pname = "rtl-sdr";
@@ -10,6 +10,12 @@ stdenv.mkDerivation rec {
     sha256 = "0lmvsnb4xw4hmz6zs0z5ilsah5hjz29g1s0050n59fllskqr3b8k";
   };
 
+  patches = [ (fetchpatch {
+    name = "hardened-udev-rules.patch";
+    url = "https://osmocom.org/projects/rtl-sdr/repository/revisions/b2814731563be4d5a0a68554ece6454a2c63af12/diff?format=diff";
+    sha256 = "0ns740s2rys4glq4la4bh0sxfv1mn61yfjns2yllhx70rsb2fqrn";
+  }) ];
+
   nativeBuildInputs = [ pkgconfig cmake ];
   buildInputs = [ libusb1 ];