From 1da522dcaf6b0f5f8f40818d02e98f1b9d715b7f Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Thu, 7 Aug 2025 11:42:14 -0400 Subject: [PATCH 1/2] updating nsd-app-wrap.sh and making quicknxs an example --- rpm/nsd-app-wrap.spec | 2 +- src/nsd-app-wrap.sh | 21 +++++++++++++++++++++ src/quicknxs | 11 ++++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/rpm/nsd-app-wrap.spec b/rpm/nsd-app-wrap.spec index b4c165b..01201ac 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.01 +Version: 2.02 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index d305d30..ebf5e48 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -97,3 +97,24 @@ activate_and_launch() { echo "Execute: ${COMMAND} $*" "${COMMAND}" "$@" } + +pixi_launch() { + PIXI_PREFIX="/usr/local/pixi" + PIXI_ENV="${1}" + shift + PIXI_TASK="${@}" + + path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" + + echo "P: $PIXI_PREFIX, E: $PIXI_ENV, T: $PIXI_TASK - ptm: $path_to_manifest." + + _remove_font_cache + + pixi_run="pixi run --frozen --manifest-path $path_to_manifest $PIXI_TASK" + + echo "pixi command: $pixi_run" + + $pixi_run + +} + diff --git a/src/quicknxs b/src/quicknxs index 37047cc..c01d79c 100644 --- a/src/quicknxs +++ b/src/quicknxs @@ -2,13 +2,13 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=quicknxs +PIXI_ENVIRON=quicknxs if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=quicknxs-dev + PIXI_ENVIRON=quicknxs_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=quicknxs-qa + PIXI_ENVIRON=quicknxs_qa shift # drop this argument fi fi @@ -18,6 +18,7 @@ fi . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ || . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "quicknxs-gui" "$@") +args=("${PIXI_ENVIRON}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" + -- GitLab From 6b236012011436fd801325eeb67049298fd93c39 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Thu, 7 Aug 2025 12:14:55 -0400 Subject: [PATCH 2/2] updating nsd-app-wrap.sh removing echos --- src/nsd-app-wrap.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index ebf5e48..ee3ef12 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -102,17 +102,19 @@ pixi_launch() { PIXI_PREFIX="/usr/local/pixi" PIXI_ENV="${1}" shift + + # This grabs everything past the first argument PIXI_TASK="${@}" path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" - echo "P: $PIXI_PREFIX, E: $PIXI_ENV, T: $PIXI_TASK - ptm: $path_to_manifest." + #echo "P: $PIXI_PREFIX, E: $PIXI_ENV, T: $PIXI_TASK - ptm: $path_to_manifest." _remove_font_cache pixi_run="pixi run --frozen --manifest-path $path_to_manifest $PIXI_TASK" - echo "pixi command: $pixi_run" + #echo "pixi command: $pixi_run" $pixi_run -- GitLab