From ac4c2919fb1870a47711952615ca0bd56147c247 Mon Sep 17 00:00:00 2001 From: madomado Date: Thu, 29 Aug 2024 21:53:15 +0800 Subject: [PATCH] add: nph (#2016) * add: nph * nim Signed-off-by: madomado --------- Signed-off-by: madomado (cherry picked from commit 8074e4a17f45ddc700dbddeff6dda8ab0dfb0d45) --- anda/langs/nim/nph/anda.hcl | 5 +++++ anda/langs/nim/nph/nph.spec | 31 +++++++++++++++++++++++++++++++ anda/langs/nim/nph/update.rhai | 1 + 3 files changed, 37 insertions(+) create mode 100644 anda/langs/nim/nph/anda.hcl create mode 100644 anda/langs/nim/nph/nph.spec create mode 100644 anda/langs/nim/nph/update.rhai diff --git a/anda/langs/nim/nph/anda.hcl b/anda/langs/nim/nph/anda.hcl new file mode 100644 index 0000000000..d20fe9c328 --- /dev/null +++ b/anda/langs/nim/nph/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "nph.spec" + } +} diff --git a/anda/langs/nim/nph/nph.spec b/anda/langs/nim/nph/nph.spec new file mode 100644 index 0000000000..d0fa8a89c2 --- /dev/null +++ b/anda/langs/nim/nph/nph.spec @@ -0,0 +1,31 @@ +%define debug_package %nil + +Name: nph +Version: 0.6.0 +Release: 1%?dist +Summary: An opinionated code formatter for Nim +License: MIT +URL: https://github.com/arnetheduck/nph +Source0: %url/archive/refs/tags/v%version.tar.gz +SourceLicense: MIT +Packager: madonuko +BuildRequires: anda-srpm-macros +BuildRequires: nim + +%description +nph is an opinionated source code formatter for the Nim language, aiming to take the drudgery of manual formatting out of your coding day. + +%prep +%autosetup +%nim_prep -t:"%nim_tflags" -l:"%nim_lflags" + +%build +nimble c -d:release -t:"%nim_tflags" -l:"%nim_lflags" src/nph + +%install +install -Dpm755 src/nph %buildroot%_bindir/nph + +%files +%_bindir/nph +%license copying.txt +%doc README.md diff --git a/anda/langs/nim/nph/update.rhai b/anda/langs/nim/nph/update.rhai new file mode 100644 index 0000000000..95b48208ab --- /dev/null +++ b/anda/langs/nim/nph/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("arnetheduck/nph"));