progressing in nix nimble it now compiles ok

This commit is contained in:
Ivan Folgueira Bande 2026-02-17 00:56:05 +01:00 committed by Ivan FB
parent 3fcdfd057e
commit e73e82e7a4
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270
7 changed files with 30 additions and 38 deletions

View File

@ -80,18 +80,6 @@ else:
switch("define", "withoutPCRE") switch("define", "withoutPCRE")
# the default open files limit is too low on macOS (512), breaking the
# "--debugger:native" build. It can be increased with `ulimit -n 1024`.
if not defined(macosx) and not defined(android):
# add debugging symbols and original files and line numbers
--debugger:
native
if not (defined(windows) and defined(i386)) and not defined(disable_libbacktrace):
# light-weight stack traces using libbacktrace and libunwind
--define:
nimStackTraceOverride
switch("import", "libbacktrace")
--define: --define:
nimOldCaseObjects nimOldCaseObjects
# https://github.com/status-im/nim-confutils/issues/9 # https://github.com/status-im/nim-confutils/issues/9

28
flake.lock generated
View File

@ -2,17 +2,17 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1740603184, "lastModified": 1770464364,
"narHash": "sha256-t+VaahjQAWyA+Ctn2idyo1yxRIYpaDxMgHkgCNiMJa4=", "narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f44bd8ca21e026135061a0a57dcf3d0775b67a49", "rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f44bd8ca21e026135061a0a57dcf3d0775b67a49", "rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457",
"type": "github" "type": "github"
} }
}, },
@ -30,11 +30,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771125043, "lastModified": 1771211437,
"narHash": "sha256-ldf/s49n6rOAxl7pYLJGGS1N/assoHkCOWdEdLyNZkc=", "narHash": "sha256-lcNK438i4DGtyA+bPXXyVLHVmJjYpVKmpux9WASa3ro=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "4912f951a26dc8142b176be2c2ad834319dc06e8", "rev": "c62195b3d6e1bb11e0c2fb2a494117d3b55d410f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -51,11 +51,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748399823, "lastModified": 1771211437,
"narHash": "sha256-kahD8D5hOXOsGbNdoLLnqCL887cjHkx98Izc37nDjlA=", "narHash": "sha256-lcNK438i4DGtyA+bPXXyVLHVmJjYpVKmpux9WASa3ro=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "d68a69dc71bc19beb3479800392112c2f6218159", "rev": "c62195b3d6e1bb11e0c2fb2a494117d3b55d410f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -72,17 +72,17 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1759236302, "lastModified": 1771279884,
"narHash": "sha256-tzX/C5tKo5GkydZPFhGafRdFqgHUqTpr2sh/49/a/sY=", "narHash": "sha256-tzkQPwSl4vPTUo1ixHh6NCENjsBDroMKTjifg2q8QX8=",
"owner": "vacp2p", "owner": "vacp2p",
"repo": "zerokit", "repo": "zerokit",
"rev": "a4bb3feb5054e6fd24827adf204493e6e173437b", "rev": "53b18098e6d5d046e3eb1ac338a8f4f651432477",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "vacp2p", "owner": "vacp2p",
"ref": "v0.9.0",
"repo": "zerokit", "repo": "zerokit",
"rev": "53b18098e6d5d046e3eb1ac338a8f4f651432477",
"type": "github" "type": "github"
} }
} }

View File

@ -7,9 +7,9 @@
}; };
inputs = { inputs = {
# Pinned nixpkgs commit # Pinning the commit to use same commit across different projects.
nixpkgs.url = "github:NixOS/nixpkgs?rev=f44bd8ca21e026135061a0a57dcf3d0775b67a49"; # A commit from nixpkgs 25.11 release : https://github.com/NixOS/nixpkgs/tree/release-25.11
#nixpkgs.url = "github:NixOS/nixpkgs?rev=23d72dabcb3b12469f57b37170fcbc1789bd7457"; nixpkgs.url = "github:NixOS/nixpkgs?rev=23d72dabcb3b12469f57b37170fcbc1789bd7457";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
@ -18,7 +18,7 @@
# External flake input: Zerokit pinned to a specific commit # External flake input: Zerokit pinned to a specific commit
zerokit = { zerokit = {
url = "github:vacp2p/zerokit/v0.9.0"; url = "github:vacp2p/zerokit/53b18098e6d5d046e3eb1ac338a8f4f651432477";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };

View File

@ -33,8 +33,8 @@ in stdenv.mkDerivation {
version = "${version}-${revision}"; version = "${version}-${revision}";
env = { env = {
#ANDROID_SDK_ROOT="${pkgs.androidPkgs.sdk}"; ANDROID_SDK_ROOT="${pkgs.androidPkgs.sdk}";
#ANDROID_NDK_HOME="${pkgs.androidPkgs.ndk}"; ANDROID_NDK_HOME="${pkgs.androidPkgs.ndk}";
NIMFLAGS = "-d:disableMarchNative -d:git_revision_override=${revision}"; NIMFLAGS = "-d:disableMarchNative -d:git_revision_override=${revision}";
}; };
@ -58,6 +58,8 @@ in stdenv.mkDerivation {
]; ];
configurePhase = '' configurePhase = ''
export HOME=$TMPDIR/myhome
mkdir -p $HOME
export NIMBLE_DIR=$NIX_BUILD_TOP/nimbledeps export NIMBLE_DIR=$NIX_BUILD_TOP/nimbledeps
cp -r ${nimbleDeps}/nimbledeps $NIMBLE_DIR cp -r ${nimbleDeps}/nimbledeps $NIMBLE_DIR
cp ${nimbleDeps}/nimble.paths ./ cp ${nimbleDeps}/nimble.paths ./

View File

@ -37,6 +37,8 @@ stdenv.mkDerivation {
--include='*.h' \ --include='*.h' \
--include='*.S' \ --include='*.S' \
--include='*.cc' \ --include='*.cc' \
--include='*.inc' \
--include='*.a' \
--exclude='*' \ --exclude='*' \
$NIMBLE_DIR/pkgs2 $out/nimbledeps $NIMBLE_DIR/pkgs2 $out/nimbledeps
''; '';
@ -53,7 +55,7 @@ stdenv.mkDerivation {
''; '';
# Make this a fixed-output derivation to allow internet access for Nimble. # Make this a fixed-output derivation to allow internet access for Nimble.
outputHash = "sha256-19mrGOi2LY3xtlzgftP0Q7NxrlOZ7GmxLQgsHbCGKCc="; outputHash = "sha256-dEWWLeuc15XidSEze+lN3s743VAc2bk9tGEOByZt7rU=";
outputHashAlgo = "sha256"; outputHashAlgo = "sha256";
outputHashMode = "recursive"; outputHashMode = "recursive";
} }

View File

@ -10,8 +10,8 @@
androidenv.composeAndroidPackages { androidenv.composeAndroidPackages {
cmdLineToolsVersion = "9.0"; cmdLineToolsVersion = "9.0";
toolsVersion = "26.1.1"; toolsVersion = "26.1.1";
platformToolsVersion = "34.0.5"; platformToolsVersion = "36.0.2";
buildToolsVersions = [ "34.0.0" ]; buildToolsVersions = [ "36.0.0" ];
platformVersions = [ "34" ]; platformVersions = [ "34" ];
cmakeVersions = [ "3.22.1" ]; cmakeVersions = [ "3.22.1" ];
ndkVersion = "27.2.12479018"; ndkVersion = "27.2.12479018";

View File

@ -10,9 +10,9 @@ description = "Waku, Private P2P Messaging for Resource-Restricted Devices"
license = "MIT or Apache License 2.0" license = "MIT or Apache License 2.0"
### Dependencies ### Dependencies
requires "nim >= 2.2.0", requires "nim >= 2.2.4",
# Async & Concurrency # Async & Concurrency
"chronos >= 4.0.4", "chronos >= 4.2.0",
"taskpools", "taskpools",
# Logging & Configuration # Logging & Configuration
"chronicles", "chronicles",
@ -54,7 +54,7 @@ requires "nim >= 2.2.0",
"testutils", "testutils",
"unittest2" "unittest2"
# We use a custom branch to allow higher chronos versions # We use a custom branch to allow higher chronos versions, like nim-chronos 4.2.0
requires "https://github.com/status-im/nim-websock.git#allow-high-chronos-versions" requires "https://github.com/status-im/nim-websock.git#allow-high-chronos-versions"
# Packages not on nimble (use git URLs) # Packages not on nimble (use git URLs)