gqrx: add darwin support

This commit is contained in:
Chuang Zhu 2025-01-21 07:05:27 +08:00
parent ae06b9c2d8
commit f962ed7c2f

View File

@ -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