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)
This commit is contained in:
mm1995tk
2026-06-30 23:21:45 +09:00
parent 76047a6dba
commit f286327a1a
+13 -7
View File
@@ -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 = {