Hey everyone,
I'm trying to create Fedora packages that will hopefully fix the issues with Terra, which you can view here: https://copr.fedorainfracloud.org/coprs/planetis/nim/builds/
I have limited experience with Fedora, but you can find my work-in-progress .spec file here: https://download.copr.fedorainfracloud.org/results/planetis/nim/fedora-42-x86_64/09366435-nim-devel/nim-devel.spec
While it builds normal modules correctly, the package struggles with the "$nim" special import that's used in nimony. Any help would be appreciated.
When I try to compile, I get this error:
$ nim c hastur.nim
Error: cannot open file: /usr/lib/nim/dist/checksums/src/checksums/sha1
As I currently understand it, this is caused by the splitting of the Nim directories into different system directories (/usr/bin, /usr/lib/nim, /usr/share/nim, /etc/nim). More information about this issue can be found here: https://forum.nim-lang.org/t/10191 and https://nim-lang.org/docs/packaging.html
I've tried implementing solutions from other distributions without success:
I also found that another preexisting Copr repo used this solution to fix the "system.nim not found" issue:
# Update config files with correct paths
sed -i '1i lib = "%{_libdir}/nim/lib"' %{buildroot}%{_sysconfdir}/nim/nim.cfg
sed -i '1i path = "%{_datadir}/nim"' %{buildroot}%{_sysconfdir}/nim/nim.cfg
I appreciate any suggestions on how to resolve the "$nim" special import issue.
But in any case I would like to know if this step is still relevant:
# Fix FS#50252, unusual placement of header files
install -d "${pkgdir}/usr/include"
cp -a "${pkgdir}/usr/lib/nim/"*.h "${pkgdir}/usr/include"
And also:
nim c --app:lib -d:createNimRtl -d:release nimrtl.nim
install -m 755 lib/libnimrtl.so "${pkgdir}/usr/lib/libnimrtl.so"
Thanks.
The Nim nightlies packages are up and successfully compile Nimony and its documentation. You might need to download the rpm packages directly because of my experimentation without incrementing Release, copr has an older version cached. They include the necessary documentation without additional bloat, such as test directories.
Two notes I would like to add: