From 61e075f9ab02100d09dd6f41e2d95e80301c5680 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Wed, 11 Feb 2026 23:34:51 +0100 Subject: [PATCH] generic cleanup and refactor --- Makefile | 5 +- config.nims | 11 - flake.nix | 2 +- nimble.lock | 854 ++++++++++++++++++++++++---------------------- nix/README.md | 35 -- nix/checksums.nix | 12 - nix/csources.nix | 12 - nix/default.nix | 4 +- nix/deps.nix | 4 +- nix/sat.nix | 13 - nix/zippy.nix | 9 - waku.nimble | 6 +- 12 files changed, 454 insertions(+), 513 deletions(-) delete mode 100644 nix/README.md delete mode 100644 nix/checksums.nix delete mode 100644 nix/csources.nix delete mode 100644 nix/sat.nix delete mode 100644 nix/zippy.nix diff --git a/Makefile b/Makefile index dead03e98..6227b1562 100644 --- a/Makefile +++ b/Makefile @@ -392,8 +392,8 @@ ifeq ($(STATIC), 1) BUILD_COMMAND = libwakuStatic endif -libwaku: | build deps librln - echo -e $(BUILD_MSG) "build/$@.$(LIB_EXT)" && nimble $(BUILD_COMMAND) $@.$(LIB_EXT) +libwaku: | build librln + nimble --verbose $(BUILD_COMMAND) waku.nimble cwaku_example: | build libwaku echo -e $(BUILD_MSG) "build/$@" && \ @@ -438,6 +438,7 @@ ifndef ANDROID_NDK_HOME endif build-libwaku-for-android-arch: +ifneq ($(findstring /nix/store,$(LIBRLN_FILE)),) mkdir -p $(CURDIR)/build/android/$(ABIDIR)/ CPU=$(CPU) ABIDIR=$(ABIDIR) ANDROID_ARCH=$(ANDROID_ARCH) ANDROID_COMPILER=$(ANDROID_COMPILER) ANDROID_TOOLCHAIN_DIR=$(ANDROID_TOOLCHAIN_DIR) nimble libWakuAndroid else diff --git a/config.nims b/config.nims index ba2ae98d4..7f3f217f2 100644 --- a/config.nims +++ b/config.nims @@ -1,20 +1,9 @@ import os -if defined(release): - switch("nimcache", "nimcache/release/$projectName") -else: - switch("nimcache", "nimcache/debug/$projectName") - if defined(windows): switch("passL", "rln.lib") switch("define", "postgres=false") - # Automatically add all vendor subdirectories - for dir in walkDir("./vendor"): - if dir.kind == pcDir: - switch("path", dir.path) - switch("path", dir.path / "src") - # disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries switch("passL", "-Wl,--no-insert-timestamp") # increase stack size diff --git a/flake.nix b/flake.nix index 88229a826..b148c8711 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Logos Messaging Nim build flake"; + description = "Logos-message-delivery build flake"; nixConfig = { extra-substituters = [ "https://nix-cache.status.im/" ]; diff --git a/nimble.lock b/nimble.lock index 054ddafce..e07a3d019 100644 --- a/nimble.lock +++ b/nimble.lock @@ -1,12 +1,36 @@ { "version": 2, "packages": { + "nim": { + "version": "2.2.6", + "vcsRevision": "372826d4317f1f8cb99abd750698f4a00c5cd39a", + "url": "https://github.com/nim-lang/Nim.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "b3179cffd77e51d16ea343b5493d895e8bc8c085" + } + }, + "libbacktrace": { + "version": "0.0.9", + "vcsRevision": "d8bd4ce5c46bb6d2f984f6b3f3d7380897d95ecb", + "url": "https://github.com/status-im/nim-libbacktrace", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "ae3e8ecc27d80fd02b4538c7bdc9edf470d5023e" + } + }, "unittest2": { "version": "0.2.5", "vcsRevision": "26f2ef3ae0ec72a2a75bfe557e02e88f6a31c189", "url": "https://github.com/status-im/nim-unittest2", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "nim" + ], "checksums": { "sha1": "02bb3751ba9ddc3c17bfd89f2e41cb6bfb8fc0c9" } @@ -17,6 +41,7 @@ "url": "https://github.com/status-im/nim-bearssl", "downloadMethod": "git", "dependencies": [ + "nim", "unittest2" ], "checksums": { @@ -24,80 +49,30 @@ } }, "bearssl_pkey_decoder": { - "version": "0.1.0", + "version": "#21dd3710df9345ed2ad8bf8f882761e07863b8e0", "vcsRevision": "21dd3710df9345ed2ad8bf8f882761e07863b8e0", "url": "https://github.com/vacp2p/bearssl_pkey_decoder", "downloadMethod": "git", "dependencies": [ + "nim", "bearssl" ], "checksums": { "sha1": "21b42e2e6ddca6c875d3fc50f36a5115abf51714" } }, - "results": { - "version": "0.5.1", - "vcsRevision": "df8113dda4c2d74d460a8fa98252b0b771bf1f27", - "url": "https://github.com/arnetheduck/nim-results", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "a9c011f74bc9ed5c91103917b9f382b12e82a9e7" - } - }, - "stew": { - "version": "0.4.2", - "vcsRevision": "b66168735d6f3841c5239c3169d3fe5fe98b1257", - "url": "https://github.com/status-im/nim-stew", + "jwt": { + "version": "#18f8378de52b241f321c1f9ea905456e89b95c6f", + "vcsRevision": "18f8378de52b241f321c1f9ea905456e89b95c6f", + "url": "https://github.com/vacp2p/nim-jwt.git", "downloadMethod": "git", "dependencies": [ - "results", - "unittest2" + "nim", + "bearssl", + "bearssl_pkey_decoder" ], "checksums": { - "sha1": "928e82cb8d2f554e8f10feb2349ee9c32fee3a8c" - } - }, - "faststreams": { - "version": "0.5.0", - "vcsRevision": "ce27581a3e881f782f482cb66dc5b07a02bd615e", - "url": "https://github.com/status-im/nim-faststreams", - "downloadMethod": "git", - "dependencies": [ - "stew", - "unittest2" - ], - "checksums": { - "sha1": "ee61e507b805ae1df7ec936f03f2d101b0d72383" - } - }, - "serialization": { - "version": "0.5.2", - "vcsRevision": "b0f2fa32960ea532a184394b0f27be37bd80248b", - "url": "https://github.com/status-im/nim-serialization", - "downloadMethod": "git", - "dependencies": [ - "faststreams", - "unittest2", - "stew" - ], - "checksums": { - "sha1": "fa35c1bb76a0a02a2379fe86eaae0957c7527cb8" - } - }, - "json_serialization": { - "version": "0.4.4", - "vcsRevision": "c343b0e243d9e17e2c40f3a8a24340f7c4a71d44", - "url": "https://github.com/status-im/nim-json-serialization", - "downloadMethod": "git", - "dependencies": [ - "faststreams", - "serialization", - "stew", - "results" - ], - "checksums": { - "sha1": "8b3115354104858a0ac9019356fb29720529c2bd" + "sha1": "bcfd6fc9c5e10a52b87117219b7ab5c98136bc8e" } }, "testutils": { @@ -106,25 +81,76 @@ "url": "https://github.com/status-im/nim-testutils", "downloadMethod": "git", "dependencies": [ + "nim", "unittest2" ], "checksums": { "sha1": "d1678f50aa47d113b4e77d41eec2190830b523fa" } }, - "chronicles": { - "version": "0.12.2", - "vcsRevision": "27ec507429a4eb81edc20f28292ee8ec420be05b", - "url": "https://github.com/status-im/nim-chronicles", + "db_connector": { + "version": "0.1.0", + "vcsRevision": "29450a2063970712422e1ab857695c12d80112a6", + "url": "https://github.com/nim-lang/db_connector", "downloadMethod": "git", "dependencies": [ - "faststreams", - "serialization", - "json_serialization", - "testutils" + "nim" ], "checksums": { - "sha1": "02febb20d088120b2836d3306cfa21f434f88f65" + "sha1": "4f2e67d0e4b61af9ac5575509305660b473f01a4" + } + }, + "results": { + "version": "0.5.1", + "vcsRevision": "df8113dda4c2d74d460a8fa98252b0b771bf1f27", + "url": "https://github.com/arnetheduck/nim-results", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "a9c011f74bc9ed5c91103917b9f382b12e82a9e7" + } + }, + "nat_traversal": { + "version": "0.0.1", + "vcsRevision": "860e18c37667b5dd005b94c63264560c35d88004", + "url": "https://github.com/status-im/nim-nat-traversal", + "downloadMethod": "git", + "dependencies": [ + "nim", + "results" + ], + "checksums": { + "sha1": "1a376d3e710590ef2c48748a546369755f0a7c97" + } + }, + "stew": { + "version": "0.4.2", + "vcsRevision": "b66168735d6f3841c5239c3169d3fe5fe98b1257", + "url": "https://github.com/status-im/nim-stew", + "downloadMethod": "git", + "dependencies": [ + "nim", + "results", + "unittest2" + ], + "checksums": { + "sha1": "928e82cb8d2f554e8f10feb2349ee9c32fee3a8c" + } + }, + "zlib": { + "version": "0.1.0", + "vcsRevision": "e680f269fb01af2c34a2ba879ff281795a5258fe", + "url": "https://github.com/status-im/nim-zlib", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "results" + ], + "checksums": { + "sha1": "bbde4f5a97a84b450fef7d107461e5f35cf2b47f" } }, "httputils": { @@ -133,6 +159,7 @@ "url": "https://github.com/status-im/nim-http-utils", "downloadMethod": "git", "dependencies": [ + "nim", "stew", "results", "unittest2" @@ -143,10 +170,11 @@ }, "chronos": { "version": "4.0.4", - "vcsRevision": "712f9937e46a9ba1949230e8e119d776aea1c6bb", + "vcsRevision": "0d00279e67ad9fadeb944944449adc89f052b8bd", "url": "https://github.com/status-im/nim-chronos", "downloadMethod": "git", "dependencies": [ + "nim", "results", "stew", "bearssl", @@ -154,90 +182,7 @@ "unittest2" ], "checksums": { - "sha1": "03e96742e7148c38767c028c23a99cf316672f1c" - } - }, - "confutils": { - "version": "0.1.0", - "vcsRevision": "5286ed67d363a3630ece85a0e8c1141d1d52b434", - "url": "https://github.com/status-im/nim-confutils", - "downloadMethod": "git", - "dependencies": [ - "stew", - "serialization", - "results" - ], - "checksums": { - "sha1": "591f70a7e803788d34ae99e8be71a30f2a2a028d" - } - }, - "db_connector": { - "version": "0.1.0", - "vcsRevision": "74aef399e5c232f95c9fc5c987cebac846f09d62", - "url": "https://github.com/nim-lang/db_connector", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "b20053975976f94afac253d67cc6ef9200b32d02" - } - }, - "dnsclient": { - "version": "0.3.4", - "vcsRevision": "23214235d4784d24aceed99bbfe153379ea557c8", - "url": "https://github.com/ba0f3/dnsclient.nim", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "65262c7e533ff49d6aca5539da4bc6c6ce132f40" - } - }, - "nimcrypto": { - "version": "0.7.3", - "vcsRevision": "423ea4fed8de6f4544b7e3b30d868f527ed3b947", - "url": "https://github.com/cheatfate/nimcrypto", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "580910605aca0ea60b40bfaa116d0b8af1091314" - } - }, - "stint": { - "version": "0.8.2", - "vcsRevision": "470b7892561b5179ab20bd389a69217d6213fe58", - "url": "https://github.com/status-im/nim-stint", - "downloadMethod": "git", - "dependencies": [ - "stew", - "unittest2" - ], - "checksums": { - "sha1": "d8f871fd617e7857192d4609fe003b48942a8ae5" - } - }, - "secp256k1": { - "version": "0.6.0.3.2", - "vcsRevision": "b526c4b436809aa1cfe650026d796cf7b8328b91", - "url": "https://github.com/status-im/nim-secp256k1", - "downloadMethod": "git", - "dependencies": [ - "stew", - "results", - "nimcrypto" - ], - "checksums": { - "sha1": "e6e50bd4a29cb473b070eb5359d87d8946d96075" - } - }, - "nat_traversal": { - "version": "0.0.1", - "vcsRevision": "860e18c37667b5dd005b94c63264560c35d88004", - "url": "https://github.com/status-im/nim-nat-traversal", - "downloadMethod": "git", - "dependencies": [ - "results" - ], - "checksums": { - "sha1": "1a376d3e710590ef2c48748a546369755f0a7c97" + "sha1": "add14e711abc98b2203e7c5a35c860c7b86f15b5" } }, "metrics": { @@ -246,6 +191,7 @@ "url": "https://github.com/status-im/nim-metrics", "downloadMethod": "git", "dependencies": [ + "nim", "chronos", "results", "stew" @@ -254,27 +200,18 @@ "sha1": "5cdac99d85d3c146d170e85064c88fb28f377842" } }, - "sqlite3_abi": { - "version": "3.51.1.0", - "vcsRevision": "6797c31836bff377bf50f1ac7bf8122449bf99ba", - "url": "https://github.com/arnetheduck/nim-sqlite3-abi", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "6e108cbacb20ba361ebd1de9f3da6e4b30f9181d" - } - }, - "minilru": { - "version": "0.1.0", - "vcsRevision": "e3d6e6eb5f119a0b22fdab418f7a588be462ea66", - "url": "https://github.com/status-im/nim-minilru", + "faststreams": { + "version": "0.5.0", + "vcsRevision": "ce27581a3e881f782f482cb66dc5b07a02bd615e", + "url": "https://github.com/status-im/nim-faststreams", "downloadMethod": "git", "dependencies": [ - "results", + "nim", + "stew", "unittest2" ], "checksums": { - "sha1": "a2981b7ff1b7e0fd61e64844f35fe98fd35de1b2" + "sha1": "ee61e507b805ae1df7ec936f03f2d101b0d72383" } }, "snappy": { @@ -283,6 +220,7 @@ "url": "https://github.com/status-im/nim-snappy", "downloadMethod": "git", "dependencies": [ + "nim", "faststreams", "unittest2", "results", @@ -292,12 +230,271 @@ "sha1": "e572d60d6a3178c5b1cde2400c51ad771812cd3d" } }, + "serialization": { + "version": "0.5.2", + "vcsRevision": "b0f2fa32960ea532a184394b0f27be37bd80248b", + "url": "https://github.com/status-im/nim-serialization", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "unittest2", + "stew" + ], + "checksums": { + "sha1": "fa35c1bb76a0a02a2379fe86eaae0957c7527cb8" + } + }, + "toml_serialization": { + "version": "0.2.18", + "vcsRevision": "b5b387e6fb2a7cc75d54a269b07cc6218361bd46", + "url": "https://github.com/status-im/nim-toml-serialization", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "serialization", + "stew" + ], + "checksums": { + "sha1": "76ae1c2af5dd092849b41750ff29217980dc9ca3" + } + }, + "confutils": { + "version": "0.1.0", + "vcsRevision": "f684e55d56ba4016e2add64f74c4840476aa493d", + "url": "https://github.com/status-im/nim-confutils", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "serialization", + "results" + ], + "checksums": { + "sha1": "1bef15b34686adf71e88883cfc2452afe9fa095f" + } + }, + "json_serialization": { + "version": "0.4.4", + "vcsRevision": "c343b0e243d9e17e2c40f3a8a24340f7c4a71d44", + "url": "https://github.com/status-im/nim-json-serialization", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "serialization", + "stew", + "results" + ], + "checksums": { + "sha1": "8b3115354104858a0ac9019356fb29720529c2bd" + } + }, + "chronicles": { + "version": "0.12.2", + "vcsRevision": "27ec507429a4eb81edc20f28292ee8ec420be05b", + "url": "https://github.com/status-im/nim-chronicles", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "serialization", + "json_serialization", + "testutils" + ], + "checksums": { + "sha1": "02febb20d088120b2836d3306cfa21f434f88f65" + } + }, + "presto": { + "version": "0.1.1", + "vcsRevision": "d66043dd7ede146442e6c39720c76a20bde5225f", + "url": "https://github.com/status-im/nim-presto", + "downloadMethod": "git", + "dependencies": [ + "nim", + "chronos", + "chronicles", + "metrics", + "results", + "stew" + ], + "checksums": { + "sha1": "8df97c45683abe2337bdff43b844c4fbcc124ca2" + } + }, + "stint": { + "version": "0.8.2", + "vcsRevision": "470b7892561b5179ab20bd389a69217d6213fe58", + "url": "https://github.com/status-im/nim-stint", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "unittest2" + ], + "checksums": { + "sha1": "d8f871fd617e7857192d4609fe003b48942a8ae5" + } + }, + "minilru": { + "version": "0.1.0", + "vcsRevision": "6dd93feb60f4cded3c05e7af7209cf63fb677893", + "url": "https://github.com/status-im/nim-minilru", + "downloadMethod": "git", + "dependencies": [ + "nim", + "results", + "unittest2" + ], + "checksums": { + "sha1": "0be03a5da29fdd4409ea74a60fd0ccce882601b4" + } + }, + "sqlite3_abi": { + "version": "3.51.2.0", + "vcsRevision": "89ba51f557414d3a3e17ab3df8270e1bdaa3ca2a", + "url": "https://github.com/arnetheduck/nim-sqlite3-abi", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "921e733e4e8ebadc7fd06660716be8821df384ba" + } + }, + "dnsclient": { + "version": "0.3.4", + "vcsRevision": "23214235d4784d24aceed99bbfe153379ea557c8", + "url": "https://github.com/ba0f3/dnsclient.nim", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "65262c7e533ff49d6aca5539da4bc6c6ce132f40" + } + }, + "unicodedb": { + "version": "0.13.2", + "vcsRevision": "66f2458710dc641dd4640368f9483c8a0ec70561", + "url": "https://github.com/nitely/nim-unicodedb", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "739102d885d99bb4571b1955f5f12aee423c935b" + } + }, + "regex": { + "version": "0.26.3", + "vcsRevision": "4593305ed1e49731fc75af1dc572dd2559aad19c", + "url": "https://github.com/nitely/nim-regex", + "downloadMethod": "git", + "dependencies": [ + "nim", + "unicodedb" + ], + "checksums": { + "sha1": "4d24e7d7441137cd202e16f2359a5807ddbdc31f" + } + }, + "nimcrypto": { + "version": "0.7.3", + "vcsRevision": "b3dbc9c4d08e58c5b7bfad6dc7ef2ee52f2f4c08", + "url": "https://github.com/cheatfate/nimcrypto", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "f72b90fe3f4da09efa482de4f8729e7ee4abea2f" + } + }, + "websock": { + "version": "0.2.1", + "vcsRevision": "35ae76f1559e835c80f9c1a3943bf995d3dd9eb5", + "url": "https://github.com/status-im/nim-websock", + "downloadMethod": "git", + "dependencies": [ + "nim", + "chronos", + "httputils", + "chronicles", + "stew", + "nimcrypto", + "bearssl", + "results", + "zlib" + ], + "checksums": { + "sha1": "1cb5efa10cd389bc01d0707c242ae010c76a03cd" + } + }, + "json_rpc": { + "version": "0.5.4", + "vcsRevision": "b6e40a776fa2d00b97a9366761fb7da18f31ae5c", + "url": "https://github.com/status-im/nim-json-rpc", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "nimcrypto", + "stint", + "chronos", + "httputils", + "chronicles", + "websock", + "serialization", + "json_serialization", + "unittest2" + ], + "checksums": { + "sha1": "d8e8be795fcf098f4ce03b5826f6b3153f6a6e07" + } + }, + "lsquic": { + "version": "#4fb03ee7bfb39aecb3316889fdcb60bec3d0936f", + "vcsRevision": "4fb03ee7bfb39aecb3316889fdcb60bec3d0936f", + "url": "https://github.com/vacp2p/nim-lsquic", + "downloadMethod": "git", + "dependencies": [ + "nim", + "zlib", + "stew", + "chronos", + "nimcrypto", + "unittest2", + "chronicles" + ], + "checksums": { + "sha1": "f465fa994346490d0924d162f53d9b5aec62f948" + } + }, + "secp256k1": { + "version": "0.6.0.3.2", + "vcsRevision": "d8f1288b7c72f00be5fc2c5ea72bf5cae1eafb15", + "url": "https://github.com/status-im/nim-secp256k1", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "results", + "nimcrypto" + ], + "checksums": { + "sha1": "6618ef9de17121846a8c1d0317026b0ce8584e10" + } + }, "eth": { "version": "0.9.0", "vcsRevision": "d9135e6c3c5d6d819afdfb566aa8d958756b73a8", "url": "https://github.com/status-im/nim-eth", "downloadMethod": "git", "dependencies": [ + "nim", "nimcrypto", "stint", "secp256k1", @@ -318,252 +515,13 @@ "sha1": "2e01b0cfff9523d110562af70d19948280f8013e" } }, - "dnsdisc": { - "version": "0.1.0", - "vcsRevision": "203abd2b3e758e0ea3ae325769b20a7e1bcd1010", - "url": "https://github.com/status-im/nim-dnsdisc", - "downloadMethod": "git", - "dependencies": [ - "bearssl", - "chronicles", - "chronos", - "eth", - "secp256k1", - "stew", - "testutils", - "unittest2", - "nimcrypto", - "results" - ], - "checksums": { - "sha1": "c8aeb7a29b378d9ed5201c8f0273000b46552e26" - } - }, - "ffi": { - "version": "0.1.0", - "vcsRevision": "c2cc2d7ea1e0f7eb6f64661b7777ec0c2fd1d753", - "url": "https://github.com/logos-messaging/nim-ffi", - "downloadMethod": "git", - "dependencies": [ - "chronos" - ], - "checksums": { - "sha1": "4c96b0a56f219e86037662f4ddd89d0483852ae8" - } - }, - "zlib": { - "version": "0.1.0", - "vcsRevision": "c71efff5fd1721362b3363dc7d0e2a4c0dbc6453", - "url": "https://github.com/status-im/nim-zlib", - "downloadMethod": "git", - "dependencies": [ - "stew", - "results" - ], - "checksums": { - "sha1": "b98773348eda614ff6b252213dcd852fc9d68e89" - } - }, - "websock": { - "version": "0.2.1", - "vcsRevision": "35ae76f1559e835c80f9c1a3943bf995d3dd9eb5", - "url": "https://github.com/status-im/nim-websock", - "downloadMethod": "git", - "dependencies": [ - "chronos", - "httputils", - "chronicles", - "stew", - "nimcrypto", - "bearssl", - "results", - "zlib" - ], - "checksums": { - "sha1": "1cb5efa10cd389bc01d0707c242ae010c76a03cd" - } - }, - "json_rpc": { - "version": "0.5.4", - "vcsRevision": "b6e40a776fa2d00b97a9366761fb7da18f31ae5c", - "url": "https://github.com/status-im/nim-json-rpc", - "downloadMethod": "git", - "dependencies": [ - "stew", - "nimcrypto", - "stint", - "chronos", - "httputils", - "chronicles", - "websock", - "serialization", - "json_serialization", - "unittest2" - ], - "checksums": { - "sha1": "d8e8be795fcf098f4ce03b5826f6b3153f6a6e07" - } - }, - "jwt": { - "version": "0.2", - "vcsRevision": "18f8378de52b241f321c1f9ea905456e89b95c6f", - "url": "https://github.com/vacp2p/nim-jwt.git", - "downloadMethod": "git", - "dependencies": [ - "bearssl", - "bearssl_pkey_decoder" - ], - "checksums": { - "sha1": "bcfd6fc9c5e10a52b87117219b7ab5c98136bc8e" - } - }, - "libbacktrace": { - "version": "0.0.9", - "vcsRevision": "d8bd4ce5c46bb6d2f984f6b3f3d7380897d95ecb", - "url": "https://github.com/status-im/nim-libbacktrace", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "ae3e8ecc27d80fd02b4538c7bdc9edf470d5023e" - } - }, - "ngtcp2": { - "version": "0.39.0", - "vcsRevision": "791eb859145f9f268eb23eb9cbe777bdd7699c4d", - "url": "https://github.com/status-im/nim-ngtcp2", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "48fa97d200e6d4213ae389a2a6e0677f5d8795a5" - } - }, - "quic": { - "version": "0.5.2", - "vcsRevision": "6d8678a159bfb902f9725f0081d542134cd93916", - "url": "https://github.com/vacp2p/nim-quic", - "downloadMethod": "git", - "dependencies": [ - "stew", - "chronos", - "nimcrypto", - "ngtcp2", - "unittest2", - "chronicles", - "bearssl" - ], - "checksums": { - "sha1": "a32e3d6a43b2552ebe8f27457094feb9bf3f6651" - } - }, - "libp2p": { - "version": "1.14.3", - "vcsRevision": "eb7e6ff89889e41b57515f891ba82986c54809fb", - "url": "https://github.com/vacp2p/nim-libp2p", - "downloadMethod": "git", - "dependencies": [ - "nimcrypto", - "dnsclient", - "bearssl", - "chronicles", - "chronos", - "metrics", - "secp256k1", - "stew", - "websock", - "unittest2", - "results", - "quic", - "jwt" - ], - "checksums": { - "sha1": "04eed030305ed9ec128b6699066f0988eb75ec89" - } - }, - "lsquic": { - "version": "0.0.1", - "vcsRevision": "f3fe33462601ea34eb2e8e9c357c92e61f8d121b", - "url": "https://github.com/vacp2p/nim-lsquic", - "downloadMethod": "git", - "dependencies": [ - "zlib", - "stew", - "chronos", - "nimcrypto", - "unittest2", - "chronicles" - ], - "checksums": { - "sha1": "407b39ad3e84ad794b76df8d63ecafb749af6f4f" - } - }, - "presto": { - "version": "0.1.1", - "vcsRevision": "d66043dd7ede146442e6c39720c76a20bde5225f", - "url": "https://github.com/status-im/nim-presto", - "downloadMethod": "git", - "dependencies": [ - "chronos", - "chronicles", - "metrics", - "results", - "stew" - ], - "checksums": { - "sha1": "8df97c45683abe2337bdff43b844c4fbcc124ca2" - } - }, - "unicodedb": { - "version": "0.13.2", - "vcsRevision": "66f2458710dc641dd4640368f9483c8a0ec70561", - "url": "https://github.com/nitely/nim-unicodedb", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "739102d885d99bb4571b1955f5f12aee423c935b" - } - }, - "regex": { - "version": "0.26.3", - "vcsRevision": "4593305ed1e49731fc75af1dc572dd2559aad19c", - "url": "https://github.com/nitely/nim-regex", - "downloadMethod": "git", - "dependencies": [ - "unicodedb" - ], - "checksums": { - "sha1": "4d24e7d7441137cd202e16f2359a5807ddbdc31f" - } - }, - "taskpools": { - "version": "0.1.0", - "vcsRevision": "9e8ccc754631ac55ac2fd495e167e74e86293edb", - "url": "https://github.com/status-im/nim-taskpools", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "09e1b2fdad55b973724d61227971afc0df0b7a81" - } - }, - "toml_serialization": { - "version": "0.2.18", - "vcsRevision": "b5b387e6fb2a7cc75d54a269b07cc6218361bd46", - "url": "https://github.com/status-im/nim-toml-serialization", - "downloadMethod": "git", - "dependencies": [ - "faststreams", - "serialization", - "stew" - ], - "checksums": { - "sha1": "76ae1c2af5dd092849b41750ff29217980dc9ca3" - } - }, "web3": { "version": "0.8.0", "vcsRevision": "cdfe5601d2812a58e54faf53ee634452d01e5918", "url": "https://github.com/status-im/nim-web3", "downloadMethod": "git", "dependencies": [ + "nim", "chronicles", "chronos", "bearssl", @@ -580,6 +538,80 @@ "checksums": { "sha1": "26a112af032ef1536f97da2ca7364af618a11b80" } + }, + "dnsdisc": { + "version": "0.1.0", + "vcsRevision": "203abd2b3e758e0ea3ae325769b20a7e1bcd1010", + "url": "https://github.com/status-im/nim-dnsdisc", + "downloadMethod": "git", + "dependencies": [ + "nim", + "bearssl", + "chronicles", + "chronos", + "eth", + "secp256k1", + "stew", + "testutils", + "unittest2", + "nimcrypto", + "results" + ], + "checksums": { + "sha1": "c8aeb7a29b378d9ed5201c8f0273000b46552e26" + } + }, + "libp2p": { + "version": "1.15.2", + "vcsRevision": "ca48c3718246bb411ff0e354a70cb82d9a28de0d", + "url": "https://github.com/vacp2p/nim-libp2p", + "downloadMethod": "git", + "dependencies": [ + "nim", + "nimcrypto", + "dnsclient", + "bearssl", + "chronicles", + "chronos", + "metrics", + "secp256k1", + "stew", + "websock", + "unittest2", + "results", + "lsquic", + "jwt" + ], + "checksums": { + "sha1": "3b2cdc7e00261eb4210ca3d44ec3bd64c2b7bbba" + } + }, + "taskpools": { + "version": "0.1.0", + "vcsRevision": "9e8ccc754631ac55ac2fd495e167e74e86293edb", + "url": "https://github.com/status-im/nim-taskpools", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "09e1b2fdad55b973724d61227971afc0df0b7a81" + } + }, + "ffi": { + "version": "0.1.3", + "vcsRevision": "06111de155253b34e47ed2aaed1d61d08d62cc1b", + "url": "https://github.com/logos-messaging/nim-ffi", + "downloadMethod": "git", + "dependencies": [ + "nim", + "chronos", + "chronicles", + "taskpools" + ], + "checksums": { + "sha1": "6f9d49375ea1dc71add55c72ac80a808f238e5b0" + } } }, "tasks": {} diff --git a/nix/README.md b/nix/README.md deleted file mode 100644 index e928b7938..000000000 --- a/nix/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Usage - -## Shell - -A development shell can be started using: -```sh -nix develop -``` - -## Building - -To build a Codex you can use: -```sh -nix build '.?submodules=1#default' -``` -The `?submodules=1` part should eventually not be necessary. -For more details see: -https://github.com/NixOS/nix/issues/4423 - -It can be also done without even cloning the repo: -```sh -nix build 'git+https://github.com/waku-org/nwaku?submodules=1#' -``` - -## Running - -```sh -nix run 'git+https://github.com/waku-org/nwaku?submodules=1#'' -``` - -## Testing - -```sh -nix flake check ".?submodules=1#" -``` diff --git a/nix/checksums.nix b/nix/checksums.nix deleted file mode 100644 index c9c9f3d45..000000000 --- a/nix/checksums.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs ? import { } }: - -let - tools = pkgs.callPackage ./tools.nix {}; - sourceFile = ../vendor/nimbus-build-system/vendor/Nim/koch.nim; -in pkgs.fetchFromGitHub { - owner = "nim-lang"; - repo = "checksums"; - rev = tools.findKeyValue "^ +ChecksumsStableCommit = \"([a-f0-9]+)\".*$" sourceFile; - # WARNING: Requires manual updates when Nim compiler version changes. - hash = "sha256-JZhWqn4SrAgNw/HLzBK0rrj3WzvJ3Tv1nuDMn83KoYY="; -} diff --git a/nix/csources.nix b/nix/csources.nix deleted file mode 100644 index 5aa90fd6f..000000000 --- a/nix/csources.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs ? import { } }: - -let - tools = pkgs.callPackage ./tools.nix {}; - sourceFile = ../vendor/nimbus-build-system/vendor/Nim/config/build_config.txt; -in pkgs.fetchFromGitHub { - owner = "nim-lang"; - repo = "csources_v2"; - rev = tools.findKeyValue "^nim_csourcesHash=([a-f0-9]+)$" sourceFile; - # WARNING: Requires manual updates when Nim compiler version changes. - hash = "sha256-UCLtoxOcGYjBdvHx7A47x6FjLMi6VZqpSs65MN7fpBs="; -} \ No newline at end of file diff --git a/nix/default.nix b/nix/default.nix index 8fd113c23..7dfbd804a 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -38,7 +38,7 @@ in stdenv.mkDerivation { }; buildInputs = with pkgs; [ - openssl gmp zip + openssl gmp zip nimble ]; # Dependencies that should only exist in the build environment. @@ -46,7 +46,7 @@ in stdenv.mkDerivation { # Fix for Nim compiler calling 'git rev-parse' and 'lsb_release'. fakeGit = writeScriptBin "git" "echo ${version}"; in with pkgs; [ - cmake which zerokitRln nim-unwrapped-2_2 fakeGit nimbleDeps + cmake which zerokitRln fakeGit nimbleDeps cargo ] ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.cctools gcc # Necessary for libbacktrace ]; diff --git a/nix/deps.nix b/nix/deps.nix index ff7096734..5b7330dc3 100644 --- a/nix/deps.nix +++ b/nix/deps.nix @@ -48,8 +48,8 @@ stdenv.mkDerivation { done ''; - # Make this a fixed-output derivation to allows internet access for Nimble. - outputHash = "sha256-OnirsXLj4HMVTbk+b4fcC+1K9MSMJyae6I7JO16WDno="; + # Make this a fixed-output derivation to allow internet access for Nimble. + outputHash = "sha256-faWNLiyNfeyp4ynpO+F3HRj8J/3sJBgClryCrZFKfzs="; outputHashAlgo = "sha256"; outputHashMode = "recursive"; } diff --git a/nix/sat.nix b/nix/sat.nix deleted file mode 100644 index 92db58a2e..000000000 --- a/nix/sat.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs ? import { } }: - -let - tools = pkgs.callPackage ./tools.nix {}; - sourceFile = ../vendor/nimbus-build-system/vendor/Nim/koch.nim; -in pkgs.fetchFromGitHub { - owner = "nim-lang"; - repo = "sat"; - rev = tools.findKeyValue "^ +SatStableCommit = \"([a-f0-9]+)\".*$" sourceFile; - # WARNING: Requires manual updates when Nim compiler version changes. - # WARNING: Requires manual updates when Nim compiler version changes. - hash = "sha256-JFrrSV+mehG0gP7NiQ8hYthL0cjh44HNbXfuxQNhq7c="; -} diff --git a/nix/zippy.nix b/nix/zippy.nix deleted file mode 100644 index ec59dfc07..000000000 --- a/nix/zippy.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs }: - -pkgs.fetchFromGitHub { - owner = "guzba"; - repo = "zippy"; - rev = "a99f6a7d8a8e3e0213b3cad0daf0ea974bf58e3f"; - # WARNING: Requires manual updates when Nim compiler version changes. - hash = "sha256-e2ma2Oyp0dlNx8pJsdZl5o5KnaoAX87tqfY0RLG3DZs="; -} \ No newline at end of file diff --git a/waku.nimble b/waku.nimble index db398e30e..615ec3e42 100644 --- a/waku.nimble +++ b/waku.nimble @@ -11,9 +11,9 @@ license = "MIT or Apache License 2.0" #bin = @["build/waku"] ### Dependencies -requires "nim >= 2.2.4", +requires "nim >= 2.2.6", # Async & Concurrency - "chronos", + "chronos >= 4.0.4", "taskpools", # Logging & Configuration "chronicles", @@ -24,7 +24,7 @@ requires "nim >= 2.2.4", "toml_serialization", "faststreams", # Networking & P2P - "libp2p >= 1.14.3", + "libp2p >= 1.15.1", "eth", "nat_traversal", "websock",