summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fedd0881f9bcf97f8a8e1d0c9c097186c177f052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Maintainer: mnabila nblid48[at]gmail[dot]com

pkgname=stylua-git
pkgver=0.14.2.r0.g0ae6a84
pkgrel=1
pkgdesc='An opinionated code formatter for Lua 5.1 and Luau, built using full-moon.'
url='https://github.com/JohnnyMorganz/StyLua'
source=("${pkgname}::git+https://github.com/JohnnyMorganz/StyLua.git")
arch=('any')
license=('MPL-2.0')
conflicts=('stylua-bin')
sha256sums=('SKIP')
depends=('rust')

pkgver() {
  cd "${pkgname}"
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build(){
    cd "$srcdir/$pkgname"
    cargo build --locked --release --all-features
}

package() {
    cd "$srcdir/$pkgname/target/release"
    install -Dm755 stylua "${pkgdir}/usr/bin/stylua"
}