From 8fa6f90ad6d03a8eb9b7a069f78f7f10a1fa2b51 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sat, 4 Dec 2021 09:00:58 +0100 Subject: [PATCH] tsm-client: set mainProgram The TSM command line client `dsmc` should be the program that is usually invoked from this package. However, if a user explicitely asks for the package with GUI support (with `enableGui`, available in the package `tsm-client-withGui`), we set the mainProgram to the graphical application `dsmj` as that's likely what the user is looking for. --- pkgs/tools/backup/tsm-client/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/backup/tsm-client/default.nix b/pkgs/tools/backup/tsm-client/default.nix index cb7ec933e8e4..ad9b8315aedc 100644 --- a/pkgs/tools/backup/tsm-client/default.nix +++ b/pkgs/tools/backup/tsm-client/default.nix @@ -62,6 +62,7 @@ let homepage = "https://www.ibm.com/products/data-protection-and-recovery"; downloadPage = "https://www.ibm.com/support/pages/ibm-spectrum-protect-downloads-latest-fix-packs-and-interim-fixes"; platforms = [ "x86_64-linux" ]; + mainProgram = "dsmc"; license = lib.licenses.unfree; maintainers = [ lib.maintainers.yarny ]; description = "IBM Spectrum Protect (Tivoli Storage Manager) CLI and API"; @@ -148,7 +149,9 @@ in buildEnv { name = "tsm-client-${unwrapped.version}"; - inherit meta; + meta = meta // lib.attrsets.optionalAttrs enableGui { + mainProgram = "dsmj"; + }; passthru = { inherit unwrapped; }; paths = [ unwrapped ]; nativeBuildInputs = [ makeWrapper ];