Skip to content

Instantly share code, notes, and snippets.

@salif
Last active July 29, 2024 15:16
Show Gist options
  • Save salif/4b993c157362fab1a6f978ed913707a2 to your computer and use it in GitHub Desktop.
Save salif/4b993c157362fab1a6f978ed913707a2 to your computer and use it in GitHub Desktop.
Patch the Gleam formatter to fix the indentation. For the Arch Linux PKGBUILD.
# git clone https://aur.archlinux.org/gleam.git
pkgver="1.0.0"
EDITOR=${EDITOR:-micro}
makepkg --nobuild
cd src/
cp -r gleam-$pkgver gleam-$pkgver-new
$EDITOR gleam-$pkgver-new/compiler-core/src/format.rs
# - const INDENT: isize = 2;
# + const INDENT: isize = 3;
diff --unified --recursive --text gleam-$pkgver gleam-$pkgver-new > ../INDENT.patch
$EDITOR ../INDENT.patch
cd ../
$EDITOR PKGBUILD
# Add ` "INDENT.patch"` to source:
# Add ` 'SKIP'` to sha256sums and sha512sums
# Add this to prepare:
# patch --forward --strip=1 --input=../INDENT.patch
makepkg --nobuild -c
makepkg -si
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment