2024-01-13 08:15:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, fftw, hamlib, libpulseaudio, libGL, libX11,
|
|
|
|
liquid-dsp, pkg-config, soapysdr-with-plugins, wxGTK32, enableDigitalLab ? false,
|
2022-10-21 18:38:19 +00:00
|
|
|
Cocoa, WebKit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cubicsdr";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.2.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cjcliffe";
|
|
|
|
repo = "CubicSDR";
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "0cyv1vk97x4i3h3hhh7dx8mv6d1ad0fypdbx5fl26bz661sr8j2n";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
patches = [
|
|
|
|
# Fix for liquid-dsp v1.50
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/cjcliffe/CubicSDR/commit/0e3a785bd2af56d18ff06b56579197b3e89b34ab.patch";
|
|
|
|
sha256 = "sha256-mPfNZcV3FnEtGVX4sCMSs+Qc3VeSBIRkpCyx24TKkcU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [ fftw hamlib liquid-dsp soapysdr-with-plugins wxGTK32 ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ libpulseaudio libGL libX11 ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Cocoa WebKit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DUSE_HAMLIB=ON" ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional enableDigitalLab "-DENABLE_DIGITAL_LAB=ON";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://cubicsdr.com";
|
|
|
|
description = "Software Defined Radio application";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ lasandell ];
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = platforms.unix;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "CubicSDR";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|