pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lang/nim: use github submodules
Module Name: pkgsrc-wip
Committed By: arcathrax <ivan%ivanpollak.com@localhost>
Pushed By: arcathrax
Date: Tue Nov 17 13:11:14 2026 +0100
Changeset: d7840672ea6c67c4b6f5384907a829306b624725
Modified Files:
nim/Makefile
nim/distinfo
Removed Files:
nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim
nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim
Log Message:
lang/nim: use github submodules
This commit changes the way that the repositories that are needed will be
downloaded. Before this commit, every repository was manually set using their
git tag and then downloaded and extracted manually. This is a lot work,
especially if repositories have other dependencies, e.g. submodules depend on
other submodules. While some of them are not defined in a .gitmodules but
rather in koch.nim, it basically does the same. Pull a specific tag of a repo
into a given location, so why not just use submodules for everything?
This especially helps because, for example, "nimble" packaged the submodules
together for stable releases (e.g. 0.26.2), however there is a patch that
(should) allow nimble and thus nim to build on illumos and netbsd. When trying
to fetch this patch, the submodules are not included and about 8 submodules
would need to be manually fetched.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d7840672ea6c67c4b6f5384907a829306b624725
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
nim/Makefile | 50 ++++++++--------------
nim/distinfo | 48 +++++++++++++++------
...patch-dist_nimble_src_nimblepkg_downloadnim.nim | 16 -------
...dist_nimble_vendor_chronos_chronos_sendfile.nim | 19 --------
4 files changed, 53 insertions(+), 80 deletions(-)
diffs:
diff --git a/nim/Makefile b/nim/Makefile
index da8eb08ff1..1ca7a0904a 100644
--- a/nim/Makefile
+++ b/nim/Makefile
@@ -26,39 +26,32 @@
DISTNAME= nim-2.4.2
CATEGORIES= lang
MASTER_SITES= http://nim-lang.org/download/
-EXTRACT_SUFX= .tar.xz
+EXTRACT_SUFX= .tar.gz
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= https://nim-lang.org/
COMMENT= The Nim programming language
LICENSE= mit
-ATLAS_TAG= aa6fb162006f3015aa84c4305e15cb4d230f5ad6
-SAT_TAG= 9d52513b3c68bfb929dbd687d4fb2836cfee6936
-NIMBLE_TAG= 302a71139254b43b1488d65de111b6734d1a7490
+GH_SFX= .tar.gz
-GH_SFX= .tar.gz
+EXTRACT_DIR.${SAT_DISTFILE}= ${WRKSRC}
+EXTRACT_DIR.${NIMBLE_DISTFILE}= ${WRKSRC}
-ATLAS_DISTNAME= atlas-${ATLAS_TAG}
-SAT_DISTNAME= sat-${SAT_TAG}
-NIMBLE_DISTNAME=nimble-${NIMBLE_TAG}
+# https://github.com/nim-lang/Nim/blob/devel/koch.nim
+GITHUB_SUBMODULES+= nim-lang atlas fa19ace5c5d176d0e19f9b6ad08239ce2ceea676 dist/atlas
+GITHUB_SUBMODULES+= nim-lang nimble 302a71139254b43b1488d65de111b6734d1a7490 dist/nimble
+GITHUB_SUBMODULES+= nim-lang sat 9d52513b3c68bfb929dbd687d4fb2836cfee6936 dist/atlas/dist/sat
-ATLAS_DISTFILE= ${ATLAS_DISTNAME}${GH_SFX}
-SAT_DISTFILE= ${SAT_DISTNAME}${GH_SFX}
-NIMBLE_DISTFILE=${NIMBLE_DISTNAME}${GH_SFX}
-
-DISTFILES= ${DEFAULT_DISTFILES}
-DISTFILES+= ${ATLAS_DISTFILE}
-DISTFILES+= ${SAT_DISTFILE}
-DISTFILES+= ${NIMBLE_DISTFILE}
-
-SITES.${ATLAS_DISTFILE}= -${MASTER_SITE_GITHUB:=nim-lang/atlas/archive/}${ATLAS_TAG}${GH_SFX}
-SITES.${SAT_DISTFILE}= -${MASTER_SITE_GITHUB:=nim-lang/sat/archive/}${SAT_TAG}${GH_SFX}
-SITES.${NIMBLE_DISTFILE}= -${MASTER_SITE_GITHUB:=nim-lang/nimble/archive/}${NIMBLE_TAG}${GH_SFX}
-
-EXTRACT_DIR.${ATLAS_DISTFILE}= ${WRKSRC}
-EXTRACT_DIR.${SAT_DISTFILE}= ${WRKSRC}
-EXTRACT_DIR.${NIMBLE_DISTFILE}= ${WRKSRC}
+# https://github.com/nim-lang/nimble/tree/master/vendor
+GITHUB_SUBMODULES+= status-im nim-bearssl 38a5622be728fb083f6fe55c124502995b2f4e3d dist/nimble/vendor/bearssl
+GITHUB_SUBMODULES+= nim-lang checksums f8f6bd34bfa3fe12c64b919059ad856a96efcba0 dist/nimble/vendor/checksums
+GITHUB_SUBMODULES+= status-im nim-chronos dcd20011df38c0cb603382f3d626471de71d19df dist/nimble/vendor/chronos
+GITHUB_SUBMODULES+= status-im nim-http-utils f142cb2e8bd812dd002a6493b6082827bb248592 dist/nimble/vendor/httputils
+GITHUB_SUBMODULES+= arnetheduck nim-results b319652e98a198fa881ca70a76754c2dd6f09804 dist/nimble/vendor/results
+GITHUB_SUBMODULES+= nim-lang sat e63eaea8baf00bed8bcd5a29ffd8823abb265b39 dist/nimble/vendor/sat
+GITHUB_SUBMODULES+= status-im nim-stew 83eb1157963b7f49351dbdd858355fa990bbe23c dist/nimble/vendor/stew
+GITHUB_SUBMODULES+= guzba zippy bcb8c1e1be6abb0a0e35a3c6040cdd9391cc993f dist/nimble/vendor/zippy
DEPENDS+= coreutils-[0-9]*:../../sysutils/coreutils
@@ -84,15 +77,6 @@ post-extract:
# TODO: csources for cross-building?
# ${MV} ${WRKSRC}/csources_v2-${C2VERSION_TAG} ${WRKSRC}/csources_v2
- ${MKDIR} ${WRKSRC}/dist
- ${MV} ${WRKSRC}/atlas-${ATLAS_TAG} ${WRKSRC}/dist/atlas
-
- ${MV} ${WRKSRC}/nimble-${NIMBLE_TAG} ${WRKSRC}/dist/nimble
-
- ${MKDIR} ${WRKSRC}/dist/atlas/dist
- ${MV} ${WRKSRC}/sat-${SAT_TAG} ${WRKSRC}/dist/atlas/dist/sat
-
-
do-build:
cd ${WRKSRC} && ${GMAKE}
diff --git a/nim/distinfo b/nim/distinfo
index 722bd55842..a279bafed5 100644
--- a/nim/distinfo
+++ b/nim/distinfo
@@ -1,16 +1,40 @@
$NetBSD: distinfo,v 1.31 2026/11/07 22:43:07 wiz Exp $
-BLAKE2s (atlas-aa6fb162006f3015aa84c4305e15cb4d230f5ad6.tar.gz) = ea416dc909621edec9b06fa0cc510e3248b9638331055d5b9faaa1dce0f0f0d9
-SHA512 (atlas-aa6fb162006f3015aa84c4305e15cb4d230f5ad6.tar.gz) = 66c37492872dc47105f9c40d3f0c7be105b69e089293996eb9b0ccf441248dce351be2fa8bfbc9ecd7914fd2a6d66f64d83f3280f32561a03a6b4f4d581e7b0b
-Size (atlas-aa6fb162006f3015aa84c4305e15cb4d230f5ad6.tar.gz) = 160714 bytes
-BLAKE2s (nim-2.4.2.tar.xz) = a92f7c08e6a083a185b5165c610236658e6127f191e2f52414e7c1c2d98da322
-SHA512 (nim-2.4.2.tar.xz) = c9d3fb4573c3ac583f063d4e9364e7a0bcda69eb588cd843d9c0470a26c8151b20861a1eceef9fcea8358a627403ae4aa0ef698db241282c9fc8eb1b61b0cc10
-Size (nim-2.4.2.tar.xz) = 17078328 bytes
-BLAKE2s (nimble-302a71139254b43b1488d65de111b6734d1a7490.tar.gz) = 50e8c4847bd696258ae085d9388d32cccabcd68e9aca7c1aadbff22f5358761d
-SHA512 (nimble-302a71139254b43b1488d65de111b6734d1a7490.tar.gz) = 083359b314f7f61963b1d7949071e59d618d9ab2b9749a5a4238da5789ef0511f0988ddfb8d193b42b6cb15cbdf103dcb7d8342a1eaec495fa0f7a6b59da0c39
-Size (nimble-302a71139254b43b1488d65de111b6734d1a7490.tar.gz) = 930840 bytes
-BLAKE2s (sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = e61713da1b17aea1a345df71dc22cd8ec2058623546668a7b9af6db501d1a224
-SHA512 (sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = 6dff5f65bb7aaa7c59b7c832e760b35ba6f9aebbc53ef6e4d87ef3dde6308458cd6c27988c309f60f8eca9019e135fb34981704310cb55b5dd5c84de1641b20d
-Size (sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = 10247 bytes
+BLAKE2s (arnetheduck-nim-results-b319652e98a198fa881ca70a76754c2dd6f09804.tar.gz) = ecd488f80913560b39276c011cd82e6dbb68fb107914eb1ec79550aaac58da23
+SHA512 (arnetheduck-nim-results-b319652e98a198fa881ca70a76754c2dd6f09804.tar.gz) = d6c7e7908127dd4b633302e066bc58f259afccdf529fc16d0876eb8f8faa82593472d3b89ec9ce9daa086767488ce7385abd5460b8f074d6d67af01e807ea931
+Size (arnetheduck-nim-results-b319652e98a198fa881ca70a76754c2dd6f09804.tar.gz) = 24023 bytes
+BLAKE2s (guzba-zippy-bcb8c1e1be6abb0a0e35a3c6040cdd9391cc993f.tar.gz) = 8995c7f4c14c5d578c5b894c203ec3b8df4781189cf8914a6e620b1598415ee6
+SHA512 (guzba-zippy-bcb8c1e1be6abb0a0e35a3c6040cdd9391cc993f.tar.gz) = 24d5449144c56accf9dbda80d15a83eb45c2f7e3095841db47c3d3b11a3e91a19ee96961f75dd4f2e4c2dac36babf76a6dac27124521c922e426187f4f4d3ff6
+Size (guzba-zippy-bcb8c1e1be6abb0a0e35a3c6040cdd9391cc993f.tar.gz) = 21329585 bytes
+BLAKE2s (nim-2.4.2.tar.gz) = 112b619e3ffddd3a805f2bb9c5ed335f3512c1206bf2c77705b998582572c57b
+SHA512 (nim-2.4.2.tar.gz) = 9a845419f7bf4ceff5cef95027fc0d81fdf2a1c1e7cb45d5a95e60487fe25f25e0e33b6c2ebaa5034ac6ca0a4bf6a3d2ec888679baf7fb5f5181bd2d50ea9773
+Size (nim-2.4.2.tar.gz) = 377573227 bytes
+BLAKE2s (nim-lang-atlas-fa19ace5c5d176d0e19f9b6ad08239ce2ceea676.tar.gz) = 519df53052b016f5b5faa374192d9b6c340f4b93129de391ad05f853c75e926e
+SHA512 (nim-lang-atlas-fa19ace5c5d176d0e19f9b6ad08239ce2ceea676.tar.gz) = 69695e1b9ff28cb3b79d7380f4c0a98feff71ef4a8fb4c2cb2b422c5695548be7937ac3f83ea893ab2dfa33b1d1d5a9cb25a24a991fc1efe86688188c1ddf4ae
+Size (nim-lang-atlas-fa19ace5c5d176d0e19f9b6ad08239ce2ceea676.tar.gz) = 206297 bytes
+BLAKE2s (nim-lang-checksums-f8f6bd34bfa3fe12c64b919059ad856a96efcba0.tar.gz) = f3a5687055d7754eae0e1b5b3165e1dcd870f6453e6b0b9533f73a785d3886a1
+SHA512 (nim-lang-checksums-f8f6bd34bfa3fe12c64b919059ad856a96efcba0.tar.gz) = a65161833276140f084288ec872b96bab0b2778b7f5cd0616d7761e50547ba602f8105db4127318ac1234e500ed48ff7871ca487dd095d065eb9d71e6122cdeb
+Size (nim-lang-checksums-f8f6bd34bfa3fe12c64b919059ad856a96efcba0.tar.gz) = 47503 bytes
+BLAKE2s (nim-lang-nimble-302a71139254b43b1488d65de111b6734d1a7490.tar.gz) = 50e8c4847bd696258ae085d9388d32cccabcd68e9aca7c1aadbff22f5358761d
+SHA512 (nim-lang-nimble-302a71139254b43b1488d65de111b6734d1a7490.tar.gz) = 083359b314f7f61963b1d7949071e59d618d9ab2b9749a5a4238da5789ef0511f0988ddfb8d193b42b6cb15cbdf103dcb7d8342a1eaec495fa0f7a6b59da0c39
+Size (nim-lang-nimble-302a71139254b43b1488d65de111b6734d1a7490.tar.gz) = 930840 bytes
+BLAKE2s (nim-lang-sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = e61713da1b17aea1a345df71dc22cd8ec2058623546668a7b9af6db501d1a224
+SHA512 (nim-lang-sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = 6dff5f65bb7aaa7c59b7c832e760b35ba6f9aebbc53ef6e4d87ef3dde6308458cd6c27988c309f60f8eca9019e135fb34981704310cb55b5dd5c84de1641b20d
+Size (nim-lang-sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = 10247 bytes
+BLAKE2s (nim-lang-sat-e63eaea8baf00bed8bcd5a29ffd8823abb265b39.tar.gz) = 88d2420a3c898445b7a5511d3c9b684f35d7e7e2bb5f78861cead8e1604b8cfc
+SHA512 (nim-lang-sat-e63eaea8baf00bed8bcd5a29ffd8823abb265b39.tar.gz) = dfb16341369c2f6aeaa33f0c09b3a165cac584bf31ea53b001594ba3f05074142a4698b21026a20e4a008e3979505c9b68c9f29ab523cd83b4d1b14a73c9e7e0
+Size (nim-lang-sat-e63eaea8baf00bed8bcd5a29ffd8823abb265b39.tar.gz) = 10245 bytes
+BLAKE2s (status-im-nim-bearssl-38a5622be728fb083f6fe55c124502995b2f4e3d.tar.gz) = e3049933dcb467be3dcbf43e44c59ffea8ee468cc81f6d3572d40eca10f187dc
+SHA512 (status-im-nim-bearssl-38a5622be728fb083f6fe55c124502995b2f4e3d.tar.gz) = e7c6574c06daac6cc31ed7eb0823fd45258d28731c5ade0875eb502d1f8671b99d4bc256af50170bf2da19cda7361bb93f460ed7ef13fa8856f7f1cef23ce9cc
+Size (status-im-nim-bearssl-38a5622be728fb083f6fe55c124502995b2f4e3d.tar.gz) = 154852 bytes
+BLAKE2s (status-im-nim-chronos-dcd20011df38c0cb603382f3d626471de71d19df.tar.gz) = 8d7af7dc1d868a7dae4df1af33db86308531743908250c700dd59d28b8f3575a
+SHA512 (status-im-nim-chronos-dcd20011df38c0cb603382f3d626471de71d19df.tar.gz) = ae3230c094adca66622c200da56cf899ffd20c49fc5054b7e97d996ef115a625f92b9759477735eb920f734c5153ac19e339977f1d7f03673171ecd970e9bf8b
+Size (status-im-nim-chronos-dcd20011df38c0cb603382f3d626471de71d19df.tar.gz) = 708449 bytes
+BLAKE2s (status-im-nim-http-utils-f142cb2e8bd812dd002a6493b6082827bb248592.tar.gz) = 1126efcc9e6ea6f17eb3ea0ab8e2da3d3c5f62913d8a669543602e779ce780ed
+SHA512 (status-im-nim-http-utils-f142cb2e8bd812dd002a6493b6082827bb248592.tar.gz) = cafa52e9c866e84c2a73921baff6e7702fa5568f696278e9d376878547602f2d00287a813dff4fae71b167f78d9b213fea755a2db312d677a99a84ab31175da6
+Size (status-im-nim-http-utils-f142cb2e8bd812dd002a6493b6082827bb248592.tar.gz) = 35438 bytes
+BLAKE2s (status-im-nim-stew-83eb1157963b7f49351dbdd858355fa990bbe23c.tar.gz) = d6a444a3aa95970aa53cf5ebabf48ebd19130a7b60cc53b821779192f0781086
+SHA512 (status-im-nim-stew-83eb1157963b7f49351dbdd858355fa990bbe23c.tar.gz) = b2453e69ce22ddaa145c648fd4f3298cc2535a2f45a55f8917a74e30368aa6a20126fe12abd18b44cc2da8955ad1ddc279b456365b7ab9530ebe4975ac2353ca
+Size (status-im-nim-stew-83eb1157963b7f49351dbdd858355fa990bbe23c.tar.gz) = 122652 bytes
SHA1 (patch-dist_nimble_src_nimblepkg_downloadnim.nim) = 499197b81265ecf16d4c6baeca54673aead052c6
SHA1 (patch-dist_nimble_vendor_chronos_chronos_sendfile.nim) = da30276501e0521056267c28f35e14949f5a2f96
diff --git a/nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim b/nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim
deleted file mode 100644
index 6f7579ced0..0000000000
--- a/nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-dist_nimble_src_nimblepkg_downloadnim.nim,v 1.1 2026/11/07 22:43:07 wiz Exp $
-
-Add NetBSD to nimble's nightly-OS detection. Without a matching branch the
-`when` expression in getNightliesUrl is empty on NetBSD and the compiler
-rejects it with "expression '' has no type (or is ambiguous)".
-
---- dist/nimble/src/nimblepkg/downloadnim.nim.orig
-+++ dist/nimble/src/nimblepkg/downloadnim.nim
-@@ -146,5 +146,7 @@
- elif defined(openbsd):
- "openbsd"
- elif defined(haiku):
- "haiku"
-+ elif defined(netbsd):
-+ "netbsd"
- for jn in parsedContents.getElems():
diff --git a/nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim b/nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim
deleted file mode 100644
index 0d2d2f9909..0000000000
--- a/nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-dist_nimble_vendor_chronos_chronos_sendfile.nim,v 1.1 2026/11/07 22:43:07 wiz Exp $
-
-NetBSD does not provide sendfile(2) (no libc symbol, no header declaration,
-no man page). chronos grouped NetBSD with the BSDs that do, so the generated
-code called an implicitly-declared function, which the pkgsrc compiler
-wrapper turns into an error. Treat NetBSD like emscripten/haiku instead.
-
---- dist/nimble/vendor/chronos/chronos/sendfile.nim.orig
-+++ dist/nimble/vendor/chronos/chronos/sendfile.nim
-@@ -41,3 +41,3 @@
--elif defined(emscripten) or defined(haiku):
-+elif defined(emscripten) or defined(haiku) or defined(netbsd):
-
- proc sendfile*(outfd, infd: int, offset: int, count: var int): int =
-@@ -67,3 +67,2 @@
--elif defined(freebsd) or defined(openbsd) or defined(netbsd) or
-- defined(dragonflybsd):
-+elif defined(freebsd) or defined(openbsd) or defined(dragonflybsd):
- import oserrno
Home |
Main Index |
Thread Index |
Old Index