Skip to content

Commit

Permalink
refact: Replace deprecated Snapcraft arch env variables (#197)
Browse files Browse the repository at this point in the history
Signed-off-by: Lincoln Wallace <[email protected]>
  • Loading branch information
locnnil authored Dec 16, 2024
1 parent ff34705 commit 4025064
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ environment:
GIT_EXEC_PATH: "$SNAP/usr/lib/git-core"
GIT_TEMPLATE_DIR: "$SNAP/usr/share/git-core/templates"
# For nvidia support #
LD_LIBRARY_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET}:${SNAP}/lib/:${SNAP}/lib/${CRAFT_ARCH_TRIPLET}:${SNAP}/usr/lib/:${SNAP}/usr/lib/${CRAFT_ARCH_TRIPLET}
LIBGL_DRIVERS_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET}/dri
LIBVA_DRIVERS_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET}/dri
LD_LIBRARY_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:${SNAP}/lib/:${SNAP}/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:${SNAP}/usr/lib/:${SNAP}/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}
LIBGL_DRIVERS_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/dri
LIBVA_DRIVERS_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/dri
# nvidia-container-runtime can only set alternative config directory via XDG_CONFIG_HOME #
XDG_CONFIG_HOME: $SNAP_DATA/etc

Expand Down Expand Up @@ -248,8 +248,8 @@ parts:
source-tag: v1.15.0
source-depth: 1
override-pull: &arch-restrict |
[ "${CRAFT_TARGET_ARCH}" != "amd64" ] && \
[ "${CRAFT_TARGET_ARCH}" != "arm64" ] && \
[ "${CRAFT_ARCH_BUILD_FOR}" != "amd64" ] && \
[ "${CRAFT_ARCH_BUILD_FOR}" != "arm64" ] && \
exit 0
[ "${CRAFT_STEP_NAME}" = "BUILD" ] && $CRAFT_STAGE/patches/patch.sh
craftctl default
Expand Down Expand Up @@ -283,10 +283,10 @@ parts:
# Paths taken from upstream packaging #
organize:
usr/local/bin/nvidia-container-cli: usr/bin/nvidia-container-cli
usr/local/lib: usr/lib/${CRAFT_ARCH_TRIPLET}/
usr/local/lib: usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/
prime:
- usr/bin/nvidia-container-cli*
- usr/lib/${CRAFT_ARCH_TRIPLET}/libnvidia-container*.so*
- usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/libnvidia-container*.so*

tini:
plugin: cmake
Expand Down

0 comments on commit 4025064

Please sign in to comment.