From a8aed5e3340d9576814c5c929583b48b192ca719 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Tue, 12 Aug 2025 11:25:33 -0400 Subject: [PATCH 1/6] updating nsd-conda-wrap for pixi, ironically --- src/nsd-conda-wrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nsd-conda-wrap.sh b/src/nsd-conda-wrap.sh index 37ced1c..ee47dad 100755 --- a/src/nsd-conda-wrap.sh +++ b/src/nsd-conda-wrap.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then _usage exit 0 fi - CONDA_ENVIRON="$1" + PIXI_ENVIRON="$1" shift # drop this argument else echo "Must specify a conda environment to activate" @@ -33,8 +33,8 @@ fi . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || . /bin/nsd-app-wrap.sh -# activate the environment - will be deactivated on exit -activate_conda_environment "${CONDA_ENVIRON}" - -# start the application -"$STARTUP" "$@" +# launch pixi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "$STARTUP" "$@") +# launch the tool +pixi_launch "${args[@]}" -- GitLab From d568f73fabf68e763b44e464e86b39d8b141cc0d Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Tue, 12 Aug 2025 11:26:13 -0400 Subject: [PATCH 2/6] updating nsd-conda-wrap for pixi, ironically --- rpm/nsd-app-wrap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/nsd-app-wrap.spec b/rpm/nsd-app-wrap.spec index 01201ac..dd41068 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.02 +Version: 2.03 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson -- GitLab From 5e70f93a393a608bb80681639d7385adf0260e96 Mon Sep 17 00:00:00 2001 From: "Petras, Randy" Date: Tue, 12 Aug 2025 18:22:04 +0000 Subject: [PATCH 3/6] Edit nsd-app-wrap.sh removing {} around @ --- src/nsd-app-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index ee3ef12..763763b 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -104,7 +104,7 @@ pixi_launch() { shift # This grabs everything past the first argument - PIXI_TASK="${@}" + PIXI_TASK="$@" path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" -- GitLab From 6d2c805e076f6361c91ebed1982ded8164893522 Mon Sep 17 00:00:00 2001 From: "Petras, Randy" Date: Tue, 12 Aug 2025 18:26:56 +0000 Subject: [PATCH 4/6] Edit nsd-app-wrap.sh to string the array --- src/nsd-app-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index 763763b..c6ecad4 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -104,7 +104,7 @@ pixi_launch() { shift # This grabs everything past the first argument - PIXI_TASK="$@" + PIXI_TASK="${@[*]}" path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" -- GitLab From 1dce7cac6695392952a9d38d5de5e06c7e8ebe6c Mon Sep 17 00:00:00 2001 From: "Petras, Randy" Date: Tue, 12 Aug 2025 19:09:23 +0000 Subject: [PATCH 5/6] Edit nsd-app-wrap.sh $@ to ${*} --- src/nsd-app-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index c6ecad4..9b61cf4 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -104,7 +104,7 @@ pixi_launch() { shift # This grabs everything past the first argument - PIXI_TASK="${@[*]}" + PIXI_TASK="${*}" path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" -- GitLab From 0ee683fa72fcd187954571138650982c039d0b54 Mon Sep 17 00:00:00 2001 From: "Petras, Randy" Date: Tue, 12 Aug 2025 19:57:25 +0000 Subject: [PATCH 6/6] Edit nsd-app-wrap.sh adding in path to manifest checker --- src/nsd-app-wrap.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index 9b61cf4..ae0f4fb 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -102,12 +102,17 @@ pixi_launch() { PIXI_PREFIX="/usr/local/pixi" PIXI_ENV="${1}" shift - - # This grabs everything past the first argument + # This grabs everything past the first argument PIXI_TASK="${*}" path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" + # Verify path_to_manifest works + if [ ! -f "${path_to_manifest}" ]; then + echo "No pixi environment found at ${path_to_manifest}" + exit 1 + fi + #echo "P: $PIXI_PREFIX, E: $PIXI_ENV, T: $PIXI_TASK - ptm: $path_to_manifest." _remove_font_cache -- GitLab