From 59b3addb21de563d35d7dab3d26ccc767d32db1b Mon Sep 17 00:00:00 2001 From: "Braian A. Diez" Date: Fri, 28 Mar 2025 11:54:18 -0300 Subject: [PATCH 1/5] feroxbuster: 2.10.3 -> 2.11.0 --- pkgs/tools/security/feroxbuster/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/security/feroxbuster/default.nix b/pkgs/tools/security/feroxbuster/default.nix index 525aa942ddec..38cded3af940 100644 --- a/pkgs/tools/security/feroxbuster/default.nix +++ b/pkgs/tools/security/feroxbuster/default.nix @@ -8,16 +8,15 @@ Security, SystemConfiguration, }: - rustPlatform.buildRustPackage rec { pname = "feroxbuster"; - version = "2.10.3"; + version = "2.11.0"; src = fetchFromGitHub { owner = "epi052"; repo = pname; tag = "v${version}"; - hash = "sha256-3cznGVpZISLD2TbsHYyYYUTD55NmgBdNJ44V4XfZ40k="; + hash = "sha256-/NgGlXYMxGxpX93SJ6gWgZW21cSSZsgo/WMvRuLw+Bw="; }; # disable linker overrides on aarch64-linux @@ -26,7 +25,7 @@ rustPlatform.buildRustPackage rec { ''; useFetchCargoVendor = true; - cargoHash = "sha256-DjmMoATagWGK2DHMc6YB0u2X5x5hnqgCwIGe3+Wmdic="; + cargoHash = "sha256-L5s+P9eerv+O2vBUczGmn0rUMbHQtnF8hVa22wOrTGo="; OPENSSL_NO_VENDOR = true; From d1a9a606889350903b942bb5a2022a011b224045 Mon Sep 17 00:00:00 2001 From: "Braian A. Diez" Date: Fri, 28 Mar 2025 11:57:11 -0300 Subject: [PATCH 2/5] feroxbuster: added update-script --- pkgs/tools/security/feroxbuster/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/security/feroxbuster/default.nix b/pkgs/tools/security/feroxbuster/default.nix index 38cded3af940..3caea82f0ec2 100644 --- a/pkgs/tools/security/feroxbuster/default.nix +++ b/pkgs/tools/security/feroxbuster/default.nix @@ -7,6 +7,7 @@ rustPlatform, Security, SystemConfiguration, + nix-update-script, }: rustPlatform.buildRustPackage rec { pname = "feroxbuster"; @@ -45,6 +46,8 @@ rustPlatform.buildRustPackage rec { # Tests require network access doCheck = false; + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Fast, simple, recursive content discovery tool"; homepage = "https://github.com/epi052/feroxbuster"; From 037aa5c555a446f012ae12d41df1b3ae54f13674 Mon Sep 17 00:00:00 2001 From: "Braian A. Diez" Date: Fri, 28 Mar 2025 12:03:48 -0300 Subject: [PATCH 3/5] feroxbuster: remove postPatch --- pkgs/tools/security/feroxbuster/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/tools/security/feroxbuster/default.nix b/pkgs/tools/security/feroxbuster/default.nix index 3caea82f0ec2..12cb7a90eafd 100644 --- a/pkgs/tools/security/feroxbuster/default.nix +++ b/pkgs/tools/security/feroxbuster/default.nix @@ -20,11 +20,6 @@ rustPlatform.buildRustPackage rec { hash = "sha256-/NgGlXYMxGxpX93SJ6gWgZW21cSSZsgo/WMvRuLw+Bw="; }; - # disable linker overrides on aarch64-linux - postPatch = '' - rm .cargo/config - ''; - useFetchCargoVendor = true; cargoHash = "sha256-L5s+P9eerv+O2vBUczGmn0rUMbHQtnF8hVa22wOrTGo="; From 3015bf6e008c2f5644a560bd8dc1ade6f0f349b0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 29 Mar 2025 10:55:46 +0100 Subject: [PATCH 4/5] feroxbuster: refactor - move to pkgs/by-name --- .../fe/feroxbuster/package.nix} | 25 ++++++------------- pkgs/top-level/all-packages.nix | 4 --- 2 files changed, 8 insertions(+), 21 deletions(-) rename pkgs/{tools/security/feroxbuster/default.nix => by-name/fe/feroxbuster/package.nix} (69%) diff --git a/pkgs/tools/security/feroxbuster/default.nix b/pkgs/by-name/fe/feroxbuster/package.nix similarity index 69% rename from pkgs/tools/security/feroxbuster/default.nix rename to pkgs/by-name/fe/feroxbuster/package.nix index 12cb7a90eafd..84d78838efbf 100644 --- a/pkgs/tools/security/feroxbuster/default.nix +++ b/pkgs/by-name/fe/feroxbuster/package.nix @@ -5,38 +5,29 @@ openssl, pkg-config, rustPlatform, - Security, - SystemConfiguration, nix-update-script, }: + rustPlatform.buildRustPackage rec { pname = "feroxbuster"; version = "2.11.0"; src = fetchFromGitHub { owner = "epi052"; - repo = pname; + repo = "feroxbuster"; tag = "v${version}"; hash = "sha256-/NgGlXYMxGxpX93SJ6gWgZW21cSSZsgo/WMvRuLw+Bw="; }; useFetchCargoVendor = true; + cargoHash = "sha256-L5s+P9eerv+O2vBUczGmn0rUMbHQtnF8hVa22wOrTGo="; OPENSSL_NO_VENDOR = true; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ pkg-config ]; - buildInputs = - [ - openssl - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Security - SystemConfiguration - ]; + buildInputs = [ openssl ]; # Tests require network access doCheck = false; @@ -44,10 +35,10 @@ rustPlatform.buildRustPackage rec { passthru.updateScript = nix-update-script { }; meta = with lib; { - description = "Fast, simple, recursive content discovery tool"; + description = "Recursive content discovery tool"; homepage = "https://github.com/epi052/feroxbuster"; - changelog = "https://github.com/epi052/feroxbuster/releases/tag/v${version}"; - license = with licenses; [ mit ]; + changelog = "https://github.com/epi052/feroxbuster/releases/tag/v${src.tag}"; + license = licenses.mit; maintainers = with maintainers; [ fab ]; platforms = platforms.unix; mainProgram = "feroxbuster"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 174a802f54fc..2da64b69d633 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3124,10 +3124,6 @@ with pkgs; featherpad = qt5.callPackage ../applications/editors/featherpad { }; - feroxbuster = callPackage ../tools/security/feroxbuster { - inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration; - }; - ffsend = callPackage ../tools/misc/ffsend { inherit (darwin.apple_sdk.frameworks) Security AppKit; }; From c2c9bce2934e258d8ff208a2c249e045b70bfba3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 29 Mar 2025 12:10:28 +0100 Subject: [PATCH 5/5] feroxbuster: add versionCheckHook --- pkgs/by-name/fe/feroxbuster/package.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/fe/feroxbuster/package.nix b/pkgs/by-name/fe/feroxbuster/package.nix index 84d78838efbf..383b0e6884e4 100644 --- a/pkgs/by-name/fe/feroxbuster/package.nix +++ b/pkgs/by-name/fe/feroxbuster/package.nix @@ -6,6 +6,7 @@ pkg-config, rustPlatform, nix-update-script, + versionCheckHook, }: rustPlatform.buildRustPackage rec { @@ -25,13 +26,20 @@ rustPlatform.buildRustPackage rec { OPENSSL_NO_VENDOR = true; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + versionCheckHook + ]; buildInputs = [ openssl ]; # Tests require network access doCheck = false; + doInstallCheck = true; + + versionCheckProgramArg = [ "--version" ]; + passthru.updateScript = nix-update-script { }; meta = with lib; {