From f286327a1aa469e8404b2c187bc3d56a1de9794b Mon Sep 17 00:00:00 2001 From: mm1995tk Date: Tue, 30 Jun 2026 22:36:44 +0900 Subject: [PATCH] dalfox: build with rustPlatform dalfox was rewritten from Go to Rust in v3.0.0, but the package was still built with buildGoModule (vendorHash = null). With no Go module in the source tree, the build produced an empty output containing no `dalfox` binary, so the package has been broken since 3.0.0. Build it with rustPlatform.buildRustPackage instead. Keep doCheck = false: many unit tests perform live HTTP / OOB interactsh requests and fail in the sandbox, same as for the previous Go package. Assisted-by: Claude Code (Claude Opus 4.8) --- pkgs/by-name/da/dalfox/package.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/da/dalfox/package.nix b/pkgs/by-name/da/dalfox/package.nix index f20c03219d1e..71a562905e48 100644 --- a/pkgs/by-name/da/dalfox/package.nix +++ b/pkgs/by-name/da/dalfox/package.nix @@ -1,10 +1,12 @@ { lib, - buildGoModule, + rustPlatform, fetchFromGitHub, + pkg-config, + openssl, }: -buildGoModule (finalAttrs: { +rustPlatform.buildRustPackage (finalAttrs: { pname = "dalfox"; version = "3.1.2"; @@ -15,14 +17,18 @@ buildGoModule (finalAttrs: { hash = "sha256-0amVlnLwwb7YAUbTce9gRmjv3W1FMgc2/XZQKCettTY="; }; - vendorHash = null; + cargoHash = "sha256-pxlUEGCrJjoakAVpXFq2q73wEWiODsHvdax12quDlec="; - ldflags = [ - "-w" - "-s" + nativeBuildInputs = [ + pkg-config ]; - # Tests require network access + buildInputs = [ + openssl + ]; + + # Many unit tests perform live HTTP requests / OOB interactsh lookups and + # fail in the sandbox. doCheck = false; meta = {