[packages/nim] - rel 1; it buils offline on x86_64

witekfl witekfl at pld-linux.org
Tue Apr 28 16:14:32 CEST 2026


commit 457263af4530aaf61a04a7655cfcab128a34394a
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Tue Apr 28 16:11:51 2026 +0200

    - rel 1; it buils offline on x86_64

 nim.spec | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 64 insertions(+), 8 deletions(-)
---
diff --git a/nim.spec b/nim.spec
index 6133128..ff458ea 100644
--- a/nim.spec
+++ b/nim.spec
@@ -5,14 +5,32 @@
 Summary:	Nim lang
 Name:		nim
 Version:	2.2.10
-Release:	0.1
+Release:	1
 License:	MIT
 Group:		Development/Languages
 Source0:	https://github.com/nim-lang/Nim/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	5e8841b25db15574a305711d56a0f979
+Source1:	csources_v3.tar.xz
+# Source1-md5:	1668e2504be67f0636e9697a0222f752
+Source2:	https://github.com/nim-lang/checksums/archive/v0.2.2/checkums-0.2.2.tar.gz
+# Source2-md5:	c19fdbd71b6636c0549abc9e28f63a27
+Source3:	https://github.com/nim-lang/nimble/archive/v0.22.3/nimble-0.22.3.tar.gz
+# Source3-md5:	fc846c96e1e7ece9aa9d74fc0434eff1
+Source4:	https://github.com/status-im/nim-chronos/archive/v4.2.2/nim-chronos-4.2.2.tar.gz
+# Source4-md5:	6b0a933280e43edf67266c41b982dd4f
+Source5:	https://github.com/arnetheduck/nim-results/archive/v0.5.1/nim-results-0.5.1.tar.gz
+# Source5-md5:	7ef29469652498da5dea244987332c1e
+Source6:	sat.tar.gz
+# Source6-md5:	c7e4e1ab4b6e478f320e499fe2c3f1b1
+Source7:	https://github.com/status-im/nim-stew/archive/v0.4.2/nim-stew-0.4.2.tar.gz
+# Source7-md5:	9c921a181ffa9e47d21a2fa1fdb4df76
+Source8:	https://github.com/guzba/zippy/archive/0.10.19/zippy-0.10.19.tar.gz
+# Source8-md5:	80c473a7ce5bf586b5698cd3bcda47f6
+Source9:	https://github.com/nim-lang/atlas/archive/0.10.1/atlas-0.10.1.tar.gz
+# Source9-md5:	ca4f3f8546118d62b78c5f30288bb0bc
 Patch0:		%{name}-config-fix-paths.patch
 Patch1:		%{name}inst-fix-paths.patch
-Patch2:		build-docs.patch
+#Patch2:		build-docs.patch
 URL:		https://nim-lang.org/
 BuildRequires:	help2man
 BuildRequires:	nodejs
@@ -22,13 +40,52 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Nim lang.
 
 %prep
-%setup -q -n Nim-%{version}
+%setup -q -n Nim-%{version} -a1
 %patch -P0 -p1
 %patch -P1 -p1
-%patch -P2 -p1
+
+mkdir -p dist/checksums
+tar -xf %{SOURCE2} -C dist/checksums --strip-components=1
+
+mkdir -p dist/nimble
+tar -xf %{SOURCE3} -C dist/nimble --strip-components=1
+
+mkdir -p dist/atlas
+tar -xf %{SOURCE9} -C dist/atlas --strip-components=1
+
+mkdir -p dist/nimble/vendor/atlas
+tar -xf %{SOURCE9} -C dist/nimble/vendor/atlas --strip-components=1
+
+mkdir -p dist/nimble/vendor/checksums
+tar -xf %{SOURCE2} -C dist/nimble/vendor/checksums --strip-components=1
+
+mkdir -p dist/nimble/vendor/chronos
+tar -xf %{SOURCE4} -C dist/nimble/vendor/chronos --strip-components=1
+
+mkdir -p dist/nimble/vendor/results
+tar -xf %{SOURCE5} -C dist/nimble/vendor/results --strip-components=1
+
+mkdir -p dist/sat
+tar -xf %{SOURCE6} -C dist/sat --strip-components=1
+
+mkdir -p dist/nimble/vendor/sat
+tar -xf %{SOURCE6} -C dist/nimble/vendor/sat --strip-components=1
+
+mkdir -p dist/atlas/dist/sat
+tar -xf %{SOURCE6} -C dist/atlas/dist/sat --strip-components=1
+
+mkdir -p dist/nimble/vendor/stew
+tar -xf %{SOURCE7} -C dist/nimble/vendor/stew --strip-components=1
+
+mkdir -p dist/nimble/vendor/zippy
+tar -xf %{SOURCE8} -C dist/nimble/vendor/zippy --strip-components=1
 
 %build
-CC="%{__cc}" ./build_all.sh
+export NIMBLE_NO_REFRESH=1
+export NIMBLE_DIR=$PWD/dist/nimble/vendor
+export HOME=$PWD
+
+CC="%{__cc}" CFLAGS="%{rpmcflags}" ./build_all.sh
 #./bin/nim compile -d:release -d:nimUse64BitCTime koch
 #./koch boot -d:release -d:nimUse64BitCTime
 #./koch toolsNoExternal -d:release -d:nimUse64BitCTime
@@ -65,7 +122,7 @@ for fn in nimble nimsuggest nimgrep nim-gdb; do cp ./bin/$fn $RPM_BUILD_ROOT%{_b
 sed -i -e 's|/usr/bin/env bash|/bin/bash|g' $RPM_BUILD_ROOT%{_bindir}/nim-gdb
 install -vDm644 -t "$RPM_BUILD_ROOT%{_prefix}/lib/nim/doc" doc/nimdoc.{css,cls}
 install -vDm644 -t "$RPM_BUILD_ROOT%{_prefix}/lib/nim/tools" tools/debug/nim-gdb.py
-install -vDm644 -t "$RPM_BUILD_ROOT%{_prefix}/lib/nim/tools/dochack" tools/dochack/{dochack.js,fuzzysearch.nim}
+##install -vDm644 -t "$RPM_BUILD_ROOT%{_prefix}/lib/nim/tools/dochack" tools/dochack/{dochack.js,fuzzysearch.nim}
 
 # man pages
 install -vDm644 -t "$RPM_BUILD_ROOT%{_mandir}/man1" ./*.1
@@ -83,7 +140,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc readme.md security.md doc/html
+%doc readme.md security.md
 %attr(755,root,root) %{_bindir}/nim
 %attr(755,root,root) %{_bindir}/atlas
 %attr(755,root,root) %{_bindir}/nim-gdb
@@ -109,7 +166,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/nimgrep.1*
 %{_mandir}/man1/nimpretty.1*
 %{_mandir}/man1/nimsuggest.1*
-%{_datadir}/nim/doc/html/overview.html
 %{zsh_compdir}/_nim
 %{zsh_compdir}/_nimble
 %{_prefix}/lib/nim
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nim.git/commitdiff/5106b1071e2871e1d953050f1999bab7b8ce4aa7



More information about the pld-cvs-commit mailing list