From dfeab6a3df3f2bd002f941ff21e7d5bb913fa080 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Thu, 12 Jun 2025 12:23:00 -0700 Subject: [PATCH] add: grabnim (#5342) (#5344) * add: grabnim * nightly (cherry picked from commit cfea3a2afa981b8e78b361df598148c382994980) Co-authored-by: madomado --- anda/langs/nim/grabnim/anda.hcl | 8 ++++++++ anda/langs/nim/grabnim/grabnim.spec | 30 +++++++++++++++++++++++++++++ anda/langs/nim/grabnim/update.rhai | 6 ++++++ 3 files changed, 44 insertions(+) create mode 100644 anda/langs/nim/grabnim/anda.hcl create mode 100644 anda/langs/nim/grabnim/grabnim.spec create mode 100644 anda/langs/nim/grabnim/update.rhai diff --git a/anda/langs/nim/grabnim/anda.hcl b/anda/langs/nim/grabnim/anda.hcl new file mode 100644 index 0000000000..c1d3337617 --- /dev/null +++ b/anda/langs/nim/grabnim/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "grabnim.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/langs/nim/grabnim/grabnim.spec b/anda/langs/nim/grabnim/grabnim.spec new file mode 100644 index 0000000000..c2a486d2e7 --- /dev/null +++ b/anda/langs/nim/grabnim/grabnim.spec @@ -0,0 +1,30 @@ +%global commit a93fcb2d726c919221f7df5811b2d0de9a739c2b +%global commit_date 20250612 +%global shortcommit %{sub %commit 1 7} + +Name: grabnim +Version: 0~%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Simple tool to install and manage multiple nim compiler versions +License: MIT +URL: https://codeberg.org/janAkali/grabnim +Source0: %url/archive/%commit.tar.gz +Packager: madonuko +BuildRequires: nim + +%description +GrabNim is a simple tool to install, manage and switch between different versions of the Nim compiler. + +%prep +%autosetup -n %name + +%build +%nim_c %name + +%install +install -Dm755 %name -t %buildroot%_bindir + +%files +%doc README.md +%license LICENSE +%_bindir/%name diff --git a/anda/langs/nim/grabnim/update.rhai b/anda/langs/nim/grabnim/update.rhai new file mode 100644 index 0000000000..75f215ef43 --- /dev/null +++ b/anda/langs/nim/grabnim/update.rhai @@ -0,0 +1,6 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.global("commit", bump::codeberg_commit("janAkali/grabnim")); +if rpm.changed() { + rpm.global("commit_date", date()); +}