Commit c62bd5f9 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Merge branch '24u-pixi-integrated' into 'main'

updating nsd-app-wrap.sh and making quicknxs an example

See merge request !99
parents e9f7f7fa 75259649
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
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
+23 −0
Original line number Diff line number Diff line
@@ -97,3 +97,26 @@ activate_and_launch() {
    echo "Execute: ${COMMAND} $*"
    "${COMMAND}" "$@"
}

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."

        _remove_font_cache

        pixi_run="pixi run --frozen --manifest-path $path_to_manifest $PIXI_TASK"

        #echo "pixi command: $pixi_run"

        $pixi_run

}
+6 −5
Original line number Diff line number Diff line
@@ -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[@]}"