diff --git a/pkgs/tools/networking/lxi-tools/default.nix b/pkgs/tools/networking/lxi-tools/default.nix index 85518a6db9f7..c71376a5021b 100644 --- a/pkgs/tools/networking/lxi-tools/default.nix +++ b/pkgs/tools/networking/lxi-tools/default.nix @@ -5,6 +5,7 @@ , glib, gtk4, gtksourceview5, libadwaita, json-glib , desktop-file-utils, appstream-glib , gsettings-desktop-schemas +, withGui ? false }: stdenv.mkDerivation rec { @@ -20,11 +21,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson ninja cmake pkg-config - wrapGAppsHook - ]; + ] ++ lib.optional withGui wrapGAppsHook; buildInputs = [ liblxi readline lua bash-completion + ] ++ lib.optionals withGui [ glib gtk4 gtksourceview5 libadwaita json-glib desktop-file-utils appstream-glib gsettings-desktop-schemas @@ -32,7 +33,10 @@ stdenv.mkDerivation rec { postUnpack = "sed -i '/meson.add_install.*$/d' source/meson.build"; - postInstall = "glib-compile-schemas $out/share/glib-2.0/schemas"; + mesonFlags = lib.optional (!withGui) "-Dgui=false"; + + postInstall = lib.optionalString withGui + "glib-compile-schemas $out/share/glib-2.0/schemas"; meta = with lib; { description = "Tool for communicating with LXI compatible instruments"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b406a4a68553..7ae1ba077738 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30204,6 +30204,7 @@ with pkgs; lv2-cpp-tools = callPackage ../applications/audio/lv2-cpp-tools { }; lxi-tools = callPackage ../tools/networking/lxi-tools { }; + lxi-tools-gui = callPackage ../tools/networking/lxi-tools { withGui = true; }; lynx = callPackage ../applications/networking/browsers/lynx { };