add: grabnim (#5342) (#5344)

* add: grabnim

* nightly

(cherry picked from commit cfea3a2afa)

Co-authored-by: madomado <madonuko@outlook.com>
This commit is contained in:
Raboneko
2025-06-12 12:23:00 -07:00
committed by GitHub
parent 5ae49ef163
commit dfeab6a3df
3 changed files with 44 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
project pkg {
rpm {
spec = "grabnim.spec"
}
labels {
nightly = 1
}
}
+30
View File
@@ -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 <mado@fyralabs.com>
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
+6
View File
@@ -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());
}