From 15154642a9480d9fc13e481d4402e98c5a657e6d Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 24 Aug 2022 19:53:09 +0300 Subject: [PATCH] rtl_fm_streamer: init at unstable-2021-06-08 --- pkgs/by-name/rt/rtl_fm_streamer/package.nix | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 pkgs/by-name/rt/rtl_fm_streamer/package.nix diff --git a/pkgs/by-name/rt/rtl_fm_streamer/package.nix b/pkgs/by-name/rt/rtl_fm_streamer/package.nix new file mode 100644 index 000000000000..13bb403e6fff --- /dev/null +++ b/pkgs/by-name/rt/rtl_fm_streamer/package.nix @@ -0,0 +1,49 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, libusb1 +, libev +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rtl_fm_streamer"; + version = "unstable-2021-06-08"; + + src = fetchFromGitHub { + owner = "AlbrechtL"; + repo = "rtl_fm_streamer"; + rev = "ceb2bf06883f986ed01aa57c84989ba35b6b9a27"; + sha256 = "sha256-9M7GS6AC7HEJge04vl7V6ZdtwWvbMu/Rhaf9fwQa9WA="; + }; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace '/etc/udev/rules.d' "$out/etc/udev/rules.d" + + substituteInPlace rtl-sdr.rules \ + --replace 'MODE:="0666"' 'ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"' + ''; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + libusb1 + libev + ]; + + cmakeFlags = [ + (lib.cmakeBool "INSTALL_UDEV_RULES" stdenv.isLinux) + ]; + + meta = { + description = "Turns your Realtek RTL2832 based DVB dongle into a FM radio stereo receiver"; + homepage = "https://github.com/AlbrechtL/rtl_fm_streamer"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ doronbehar ]; + }; +})