Github messages for voidlinux
 help / color / mirror / Atom feed
From: EliteTK <EliteTK@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC] nim: update to 1.6.0
Date: Tue, 16 Nov 2021 21:48:12 +0100	[thread overview]
Message-ID: <20211116204812.f9W7kylE8NZbjGwTRFe0NlTO2wR_wssF9lVxN12jYFk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34106@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

[RFC] nim: update to 1.6.0
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet.
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 3601 bytes --]

From 22c21553eb0bf8aa68c9599df464ab4741299a86 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0

---
 srcpkgs/nim/template | 41 +++++++++++++++--------------------------
 1 file changed, 15 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..03e43226c0eb 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
-	case "$XBPS_TARGET_MACHINE" in
-		i686*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
-		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
-	esac
-	cd ..
+	CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= make -C csources_v1 ${makejobs}
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -75,7 +63,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +84,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

  reply	other threads:[~2021-11-16 20:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 20:40 [PR PATCH] " EliteTK
2021-11-16 20:48 ` EliteTK [this message]
2021-11-16 21:20 ` EliteTK
2021-11-17 23:37 ` [PR PATCH] [Updated] " EliteTK
2021-11-17 23:45 ` EliteTK
2021-11-18  7:40 ` [PR PATCH] [Updated] " EliteTK
2021-11-18  9:24 ` EliteTK
2021-11-18  9:26 ` EliteTK
2021-11-18 19:18 ` EliteTK
2021-11-18 20:10 ` [PR PATCH] [Updated] " EliteTK
2021-11-18 20:12 ` nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template EliteTK
2021-11-18 20:21 ` [PR PATCH] [Updated] " EliteTK
2021-11-19 23:07 ` EliteTK
2021-11-19 23:07 ` EliteTK
2021-11-19 23:13 ` EliteTK
2021-11-19 23:21 ` EliteTK
2021-11-19 23:25 ` EliteTK
2021-12-04  4:27 ` ericonr
2021-12-04  4:30 ` [PR PATCH] [Merged]: " ericonr
2021-12-04  4:30 ` ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211116204812.f9W7kylE8NZbjGwTRFe0NlTO2wR_wssF9lVxN12jYFk@z \
    --to=elitetk@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).