From f286327a1aa469e8404b2c187bc3d56a1de9794b Mon Sep 17 00:00:00 2001 From: mm1995tk Date: Tue, 30 Jun 2026 22:36:44 +0900 Subject: [PATCH 1/2] 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 = { From a028392a35f2b6d1af51fd804f04f4c46f94a26c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 1 Jul 2026 09:31:45 +0200 Subject: [PATCH 2/2] dalfox: modernize --- pkgs/by-name/da/dalfox/package.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/da/dalfox/package.nix b/pkgs/by-name/da/dalfox/package.nix index 71a562905e48..1d0872f47438 100644 --- a/pkgs/by-name/da/dalfox/package.nix +++ b/pkgs/by-name/da/dalfox/package.nix @@ -1,9 +1,10 @@ { lib, - rustPlatform, fetchFromGitHub, - pkg-config, openssl, + pkg-config, + rustPlatform, + versionCheckHook, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -19,22 +20,22 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-pxlUEGCrJjoakAVpXFq2q73wEWiODsHvdax12quDlec="; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - openssl - ]; + buildInputs = [ openssl ]; + + nativeInstallCheckInputs = [ versionCheckHook ]; # Many unit tests perform live HTTP requests / OOB interactsh lookups and # fail in the sandbox. doCheck = false; + doInstallCheck = true; + meta = { - description = "Tool for analysing parameter and XSS scanning"; + description = "Tool for analyzing parameter and XSS scanning"; homepage = "https://github.com/hahwul/dalfox"; - changelog = "https://github.com/hahwul/dalfox/releases/tag/v${finalAttrs.version}"; + changelog = "https://github.com/hahwul/dalfox/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; mainProgram = "dalfox";