summaryrefslogtreecommitdiff
path: root/pkgbuilds
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-09-11 19:33:20 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-09-11 19:33:20 +0800
commitaaefd0433a57591a8883d5d7eea418b0b5174b8a (patch)
tree9cd364a491002b443830fb7d86b75cb9e4e6bf1a /pkgbuilds
parent850800e1748242f567def2771d924b7d049f65f7 (diff)
new: helix pkgbuild
Diffstat (limited to 'pkgbuilds')
-rw-r--r--pkgbuilds/helix-git/.SRCINFO16
-rw-r--r--pkgbuilds/helix-git/PKGBUILD75
2 files changed, 91 insertions, 0 deletions
diff --git a/pkgbuilds/helix-git/.SRCINFO b/pkgbuilds/helix-git/.SRCINFO
new file mode 100644
index 00000000..9bd127f3
--- /dev/null
+++ b/pkgbuilds/helix-git/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = helix-git
+ pkgdesc = A text editor written in rust
+ pkgver = 25.01.1.r391.g17fb12bcf
+ pkgrel = 1
+ url = https://helix-editor.com
+ arch = x86_64
+ license = MPL-2.0
+ makedepends = git
+ makedepends = cargo
+ provides = hx
+ conflicts = helix
+ options = !lto
+ source = helix::git+https://github.com/helix-editor/helix.git
+ sha256sums = SKIP
+
+pkgname = helix-git
diff --git a/pkgbuilds/helix-git/PKGBUILD b/pkgbuilds/helix-git/PKGBUILD
new file mode 100644
index 00000000..ece76e9d
--- /dev/null
+++ b/pkgbuilds/helix-git/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Robin Jadoul (aur@ur4ndom.dev)
+# Contributor: Wojciech Kępka (wojciech@wkepka.dev)
+pkgname=helix-git
+_pkgname=helix
+pkgver=22.12.r3032.g7ba54f11
+pkgrel=1
+pkgdesc="A text editor written in rust"
+url="https://helix-editor.com"
+license=("MPL-2.0")
+_git="https://github.com/littleblack111/${_pkgname}.git"
+arch=(x86_64)
+makedepends=('git' 'cargo')
+depends=()
+provides=('hx')
+conflicts=('helix')
+options=(!lto)
+source=("${_pkgname}::git+${_git}")
+sha256sums=('SKIP')
+
+_bin="hx"
+_lib_path="/usr/lib/${_pkgname}"
+_rt_path="${_lib_path}/runtime"
+
+pkgver() {
+ cd "${_pkgname}"
+ git remote add upstream https://github.com/helix-editor/helix
+ git checkout upstream/master
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cat >"$_bin" <<EOF
+#!/usr/bin/env sh
+HELIX_RUNTIME=${_rt_path} exec ${_lib_path}/${_bin} "\$@"
+EOF
+ chmod +x "$_bin"
+
+ cd "${_pkgname}"
+ # git checkout fix-block-cursor-terminal
+ git remote add upstream https://github.com/helix-editor/helix
+ git checkout merges
+ git rebase upstream/merges
+ export CARGO_TARGET_DIR=target
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}
+
+build() {
+ cd "${_pkgname}"
+ export CARGO_TARGET_DIR=target
+ cargo build --locked --profile opt
+}
+
+# check() {
+# cd "${_pkgname}"
+# export CARGO_TARGET_DIR=target
+# cargo --workspace --locked
+# export RUSTFLAGS="${RUSTFLAGS} --cfg tokio_unstable"
+# cargo integration-test --locked
+# }
+
+package() {
+ cd "${_pkgname}"
+ mkdir -p "${pkgdir}${_lib_path}"
+ rm -r "runtime/grammars/sources"
+ cp -r "runtime" "${pkgdir}${_lib_path}"
+ install -Dm 0755 "target/opt/${_bin}" "${pkgdir}${_lib_path}/${_bin}"
+ install -Dm 0644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+ install -Dm 0777 "${srcdir}/${_bin}" "${pkgdir}/usr/bin/${_bin}"
+ install -Dm 0644 "contrib/Helix.desktop" "${pkgdir}/usr/share/applications/Helix.desktop"
+ install -Dm 0644 "contrib/Helix.appdata.xml" "${pkgdir}/usr/share/appdata/Helix.appdata.xml"
+ install -Dm 0644 "contrib/helix.png" "${pkgdir}/usr/share/icons/helix.png"
+ install -Dm 0644 "contrib/completion/hx.zsh" "${pkgdir}/usr/share/zsh/site-functions/_hx"
+ install -Dm 0644 "contrib/completion/hx.bash" "${pkgdir}/usr/share/bash-completion/completions/hx.bash"
+ install -Dm 0644 "contrib/completion/hx.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/hx.fish"
+}