From cf6f1b296eaf755912c15e0b8c0439f9d982df33 Mon Sep 17 00:00:00 2001
From: Raboneko <119771935+raboneko@users.noreply.github.com>
Date: Thu, 29 Aug 2024 07:33:00 -0700
Subject: [PATCH] add: nph (#2016) (#2028)

* add: nph

* nim

Signed-off-by: madomado <madonuko@outlook.com>

---------

Signed-off-by: madomado <madonuko@outlook.com>
(cherry picked from commit 8074e4a17f45ddc700dbddeff6dda8ab0dfb0d45)

Co-authored-by: madomado <madonuko@outlook.com>
---
 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 <mado@fyralabs.com>
+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"));