commit f64c107d66ad8a4893808f2d6e9a9bb895d81ba0
parent cad951c350c7b6eb3063e8d429f572167c2b6621
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 22 Nov 2021 10:10:29 +0300
Add fmreceiver
Diffstat:
2 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -326,6 +326,7 @@ lib.makeScope newScope (
### RADIO
aprsc = callPackage ./radio/aprsc { };
+ fmreceiver = libsForQt5.callPackage ./radio/fmreceiver { };
gqrx-scanner = callPackage ./radio/gqrx-scanner { };
linrad = callPackage ./radio/linrad { };
sigdigger = libsForQt5.callPackage ./radio/sigdigger {
diff --git a/pkgs/radio/fmreceiver/default.nix b/pkgs/radio/fmreceiver/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, fftwFloat, libsamplerate, libsndfile, libusb1
+, portaudio, rtl-sdr, qmake, qwt, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+ pname = "fmreceiver";
+ version = "2.1";
+
+ src = fetchFromGitHub {
+ owner = "JvanKatwijk";
+ repo = "sdr-j-fm";
+ rev = version;
+ hash = "sha256-U0m9PIB+X+TBoz5FfXMvR/tZjkNIy7B613I7eLT5UIs=";
+ };
+
+ postPatch = ''
+ substituteInPlace fmreceiver.pro \
+ --replace "-lqwt-qt5" "-lqwt" \
+ --replace "CONFIG" "#CONFIG" \
+ '';
+
+ nativeBuildInputs = [ qmake wrapQtAppsHook ];
+
+ buildInputs = [ fftwFloat libsamplerate libsndfile libusb1 portaudio qwt ];
+
+ qmakeFlags = [ "CONFIG+=dabstick" ];
+
+ qtWrapperArgs = [
+ "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ rtl-sdr ]}"
+ ];
+
+ installPhase = ''
+ install -Dm755 linux-bin/fmreceiver-2.0 $out/bin/fmreceiver
+ '';
+
+ meta = with lib; {
+ description = "A simple FM receiver";
+ inherit (src.meta) homepage;
+ license = licenses.gpl2Plus;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.linux;
+ skip.ci = stdenv.isDarwin;
+ };
+}