diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index f294c4e..83ac1e7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -23,7 +23,7 @@ description: | # snap connect shellcheck:removable-media version: git -base: core20 +base: core24 grade: stable confinement: strict @@ -40,17 +40,18 @@ parts: source: . build-packages: - cabal-install - stage-packages: - - libatomic1 override-build: | # Give ourselves enough memory to build - dd if=/dev/zero of=/tmp/swap bs=1M count=2000 + fallocate -l 2G /tmp/swap + chmod 0600 /tmp/swap mkswap /tmp/swap - swapon /tmp/swap + if ! swapon /tmp/swap; then + echo "Could not enable swap file, continuing anyway" + rm /tmp/swap + fi - cabal sandbox init cabal update cabal install -j - install -d $SNAPCRAFT_PART_INSTALL/usr/bin - install .cabal-sandbox/bin/shellcheck $SNAPCRAFT_PART_INSTALL/usr/bin + install -d "${CRAFT_PART_INSTALL}/usr/bin" + install --strip ~/.cabal/bin/shellcheck "${CRAFT_PART_INSTALL}/usr/bin"