summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ecdd72c5b5a4647e1e236452765c863f7c131e65 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: Kodi Craft <kodi@kdcf.me> 

_pkgname=nushell-kodi
pkgname=$_pkgname
pkgver=34c09d6b7
pkgrel=1
makedepends=('rust' 'cargo' 'python' 'git')
# libx11 required for stable preset
depends=('openssl' 'zlib' 'e2fsprogs' 'libx11' 'curl')
optdepends=('libxcb')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc="A new type of shell"
source=("$pkgname::git+https://github.com/KodiCraft/nushell")
url="https://www.nushell.sh"
license=('MIT')
sha256sums=('SKIP')
conflicts=('nushell' 'nushell-git')

build() {
    return 0
}

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

package() {
    case "$CFLAGS" in  *"-g"*) export RUSTFLAGS="-g";; esac
    cd "$srcdir/$pkgname"

    # user may not be using rustup, so always succeed
    rustup override set stable || true

    cargo install \
        --locked \
        --path . \
        --features stable \
        --root="$pkgdir/usr"

    rm "$pkgdir/usr/.crates.toml" "$pkgdir/usr/.crates2.json"
}