2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2022-11-21 17:40:18 +00:00
|
|
|
, meson, ninja, cmake, pkg-config
|
|
|
|
, liblxi, readline, lua, bash-completion
|
2024-04-21 15:54:59 +00:00
|
|
|
, wrapGAppsHook4
|
2022-11-21 17:40:18 +00:00
|
|
|
, glib, gtk4, gtksourceview5, libadwaita, json-glib
|
|
|
|
, desktop-file-utils, appstream-glib
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, withGui ? false
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lxi-tools";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2.7";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lxi-tools";
|
|
|
|
repo = "lxi-tools";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-69B3wW4lg6GxSpEKhuFYKTuAyd+QYb4WNbNVdZnRUt8=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson ninja cmake pkg-config
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optional withGui wrapGAppsHook4;
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = [
|
|
|
|
liblxi readline lua bash-completion
|
|
|
|
] ++ lib.optionals withGui [
|
|
|
|
glib gtk4 gtksourceview5 libadwaita json-glib
|
|
|
|
desktop-file-utils appstream-glib
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
];
|
|
|
|
|
|
|
|
postUnpack = "sed -i '/meson.add_install.*$/d' source/meson.build";
|
|
|
|
|
|
|
|
mesonFlags = lib.optional (!withGui) "-Dgui=false";
|
|
|
|
|
|
|
|
postInstall = lib.optionalString withGui
|
|
|
|
"glib-compile-schemas $out/share/glib-2.0/schemas";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for communicating with LXI compatible instruments";
|
|
|
|
longDescription = ''
|
|
|
|
lxi-tools is a collection of open source software tools
|
|
|
|
that enables control of LXI compatible instruments such
|
|
|
|
as modern oscilloscopes, power supplies,
|
|
|
|
spectrum analyzers etc.
|
|
|
|
'';
|
|
|
|
homepage = "https://lxi-tools.github.io/";
|
|
|
|
license = licenses.bsd3;
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = platforms.unix;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ maintainers.vq ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "lxi";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|