From bc8f4e2cceac7ffbca7389a894be8c71054d1743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 21 Apr 2025 19:30:37 +0200 Subject: [PATCH] nix: enforce fetching of submodules in flake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- flake.nix | 6 ++++-- nix/README.md | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 419c1d6f7..6dd7ee9fb 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,8 @@ }; inputs = { + /* Removes need for '?submodules=1` in URL since Nix 2.27. */ + self.submodules = true; nixpkgs.url = "github:NixOS/nixpkgs?rev=f44bd8ca21e026135061a0a57dcf3d0775b67a49"; zerokit = { url = "github:vacp2p/zerokit?rev=c60e0c33fc6350a4b1c20e6b6727c44317129582"; @@ -49,7 +51,7 @@ libwaku-android-arm64 = pkgs.callPackage ./nix/default.nix { inherit stableSystems; src = self; - targets = ["libwaku-android-arm64"]; + targets = ["libwaku-android-arm64"]; androidArch = "aarch64-linux-android"; zerokitPkg = zerokit.packages.${system}.zerokit-android-arm64; }; @@ -60,4 +62,4 @@ default = pkgsFor.${system}.callPackage ./nix/shell.nix {}; }); }; -} \ No newline at end of file +} diff --git a/nix/README.md b/nix/README.md index e928b7938..ae9fb97e7 100644 --- a/nix/README.md +++ b/nix/README.md @@ -11,7 +11,7 @@ nix develop To build a Codex you can use: ```sh -nix build '.?submodules=1#default' +nix build '.#default' ``` The `?submodules=1` part should eventually not be necessary. For more details see: @@ -19,17 +19,19 @@ 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#' +nix build 'git+https://github.com/waku-org/nwaku' ``` +>:warning: For Nix versions below `2.27` you will need to add `?submodules=1` to URL. + ## Running ```sh -nix run 'git+https://github.com/waku-org/nwaku?submodules=1#'' +nix run 'git+https://github.com/waku-org/nwaku'' ``` ## Testing ```sh -nix flake check ".?submodules=1#" +nix flake check . ```