2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake
|
2022-10-21 18:38:19 +00:00
|
|
|
, sqlite, wxGTK32, libusb1, soapysdr
|
2020-04-24 23:36:52 +00:00
|
|
|
, mesa_glu, libX11, gnuplot, fltk
|
2022-10-21 18:38:19 +00:00
|
|
|
, GLUT
|
2024-04-21 15:54:59 +00:00
|
|
|
, withGui ? false
|
2022-12-28 21:21:41 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "limesuite";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "23.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "myriadrf";
|
|
|
|
repo = "LimeSuite";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-f1cXrkVCIc1MqTvlCUBFqzHLhIVueybVxipNZRlF2gE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DOpenGL_GL_PREFERENCE=GLVND"
|
2022-12-28 21:21:41 +00:00
|
|
|
] ++ lib.optional (!withGui) "-DENABLE_GUI=OFF";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
libusb1
|
|
|
|
sqlite
|
|
|
|
gnuplot
|
|
|
|
libusb1
|
|
|
|
soapysdr
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2022-10-21 18:38:19 +00:00
|
|
|
GLUT
|
2022-12-28 21:21:41 +00:00
|
|
|
] ++ lib.optionals withGui [
|
|
|
|
fltk
|
|
|
|
libX11
|
|
|
|
mesa_glu
|
|
|
|
wxGTK32
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-06-18 07:06:33 +00:00
|
|
|
install -Dm444 -t $out/lib/udev/rules.d ../udev-rules/64-limesuite.rules
|
|
|
|
install -Dm444 -t $out/share/limesuite bin/Release/lms7suite_mcu/*
|
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
|
|
|
description = "Driver and GUI for LMS7002M-based SDR platforms";
|
|
|
|
homepage = "https://github.com/myriadrf/LimeSuite";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = platforms.unix;
|
2024-04-21 15:54:59 +00:00
|
|
|
badPlatforms = lib.optionals withGui platforms.darwin; # withGui transitively depends on mesa, which is broken on darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|