Skip to content

Commit 2262a06

Browse files
adapt flake.nix to properly build sds
1 parent 8251d5d commit 2262a06

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

flake.nix

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@
6363
pkgs = pkgsFor.${system};
6464

6565
# Import your Status Go packaging logic
66-
statusGo = import ./nix/pkgs/status-go {
67-
inherit self pkgs;
68-
};
69-
70-
# 🧠 Wrap library to patch Makefile automatically
66+
statusGo = import ./nix/pkgs/status-go { inherit self pkgs; };
67+
in
68+
let
7169
statusGoLibrary = pkgs.stdenv.mkDerivation {
72-
inherit (statusGo.library) pname version src buildInputs;
70+
inherit (statusGo.library) pname version src nativeBuildInputs;
71+
72+
# Add Go, git, and GNU Make
73+
buildInputs = statusGo.library.buildInputs ++ [ pkgs.go pkgs.git pkgs.gnumake pkgs.protobuf ];
7374

74-
# Copy all attributes from existing derivation
75-
# Then patch the offending Makefile
75+
# Patch sds Makefile to avoid network clone
7676
patchPhase = ''
7777
echo "Patching sds Makefile to avoid network clone..."
7878
substituteInPlace vendor/github.com/waku-org/sds-go-bindings/sds/Makefile \
@@ -81,7 +81,7 @@
8181
'';
8282

8383
# Reuse buildPhase etc. if needed
84-
inherit (statusGo.library) buildPhase installPhase;
84+
inherit (statusGo.library) preBuild buildPhase installPhase;
8585
};
8686
in {
8787
status-go-library = statusGoLibrary;

0 commit comments

Comments
 (0)