This commit is contained in:
Simon Deziel 2025-06-18 20:52:01 +00:00 committed by GitHub
commit ee1dd89cf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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