summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 969d490bfa3e5ed4fdd4e5e5c67e7f56e5143d72 (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
43
44
45
46
47
48
49
50
51
# Maintainer: ruxir-ig <ruchirkalokhe@gmail.com>
# Contributor: haawda <haawda@baum-lang.org>
# Contributor: unxsh <me@unxsh.cc>

pkgname=('nitch-git' 'nitch-git-nonerd')
pkgver=0.2.4.r0.g6c83449
pkgrel=1
pkgdesc="Incredibly fast system fetch written in Nim (git snapshot)"
arch=('x86_64')
url="https://github.com/ruxir-ig/nitch"
license=('MIT')
depends=()
makedepends=('nim' 'nimble' 'git')
source=("git+https://github.com/ruxir-ig/nitch.git")
sha256sums=('SKIP')

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

build() {
  cd "$srcdir/nitch"

  # Build Nerd Font version
  nimble build -d:release -y

  # Build Non-Nerd Font version
  nim c -d:release -o:nitchNoNerd src/nitchNoNerd.nim
}

package_nitch-git() {
  pkgdesc="Incredibly fast system fetch written in Nim (Nerd Font icons, git version)"
  optdepends=('nerd-fonts: for icon support')
  provides=('nitch')
  conflicts=('nitch')

  cd "$srcdir/nitch"
  install -Dm755 nitch "$pkgdir/usr/bin/nitch"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

package_nitch-git-nonerd() {
  pkgdesc="Incredibly fast system fetch written in Nim (no Nerd Font icons, git version)"
  provides=('nitch')
  conflicts=('nitch' 'nitch-git')

  cd "$srcdir/nitch"
  install -Dm755 nitchNoNerd "$pkgdir/usr/bin/nitch"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}