Commit f962ed7c authored by Chuang Zhu's avatar Chuang Zhu
Browse files

gqrx: add darwin support

parent ae06b9c2
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -17,9 +17,10 @@
  # drivers (optional):
  rtl-sdr,
  hackrf,
  pulseaudioSupport ? true,
  stdenv,
  pulseaudioSupport ? !stdenv.hostPlatform.isDarwin,
  libpulseaudio,
  portaudioSupport ? false,
  portaudioSupport ? stdenv.hostPlatform.isDarwin,
  portaudio,
}:

@@ -50,16 +51,18 @@ gnuradioMinimal.pkgs.mkDerivation rec {
      gnuradioMinimal.unwrapped.logLib
      mpir
      fftwFloat
      alsa-lib
      libjack2
      gnuradioMinimal.unwrapped.boost
      qtbase
      qtsvg
      qtwayland
      gnuradioMinimal.pkgs.osmosdr
      rtl-sdr
      hackrf
    ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
      alsa-lib
      qtwayland
    ]
    ++ lib.optionals (gnuradioMinimal.hasFeature "gr-ctrlport") [
      thrift
      gnuradioMinimal.unwrapped.python.pkgs.thrift
@@ -78,7 +81,7 @@ gnuradioMinimal.pkgs.mkDerivation rec {
          "Gr-audio";
    in
    [
      "-DLINUX_AUDIO_BACKEND=${audioBackend}"
      "-D${if stdenv.hostPlatform.isDarwin then "OSX" else "LINUX"}_AUDIO_BACKEND=${audioBackend}"
    ];

  # Prevent double-wrapping, inject wrapper args manually instead.
@@ -100,7 +103,7 @@ gnuradioMinimal.pkgs.mkDerivation rec {
    # Some of the code comes from the Cutesdr project, with a BSD license, but
    # it's currently unknown which version of the BSD license that is.
    license = licenses.gpl3Plus;
    platforms = platforms.linux; # should work on Darwin / macOS too
    platforms = platforms.linux ++ platforms.darwin;
    maintainers = with maintainers; [
      bjornfor
      fpletz