diff --git a/pkgs/by-name/ca/cargo-geiger/allow-warnings.patch b/pkgs/by-name/ca/cargo-geiger/allow-warnings.patch new file mode 100644 index 000000000000..97a9090e904d --- /dev/null +++ b/pkgs/by-name/ca/cargo-geiger/allow-warnings.patch @@ -0,0 +1,12 @@ +diff --git a/cargo-geiger/src/lib.rs b/cargo-geiger/src/lib.rs +index cc08146..d220ad9 100644 +--- a/cargo-geiger/src/lib.rs ++++ b/cargo-geiger/src/lib.rs +@@ -5,7 +5,6 @@ + #![deny(clippy::cargo)] + #![deny(clippy::doc_markdown)] + #![forbid(unsafe_code)] +-#![deny(warnings)] + + /// Argument parsing + pub mod args; diff --git a/pkgs/development/tools/rust/cargo-geiger/default.nix b/pkgs/by-name/ca/cargo-geiger/package.nix similarity index 74% rename from pkgs/development/tools/rust/cargo-geiger/default.nix rename to pkgs/by-name/ca/cargo-geiger/package.nix index 3fbf1af9ad46..ac3338a68a4b 100644 --- a/pkgs/development/tools/rust/cargo-geiger/default.nix +++ b/pkgs/by-name/ca/cargo-geiger/package.nix @@ -12,15 +12,19 @@ rustPlatform.buildRustPackage rec { pname = "cargo-geiger"; - version = "0.11.6"; + version = "0.11.7"; src = fetchFromGitHub { owner = "rust-secure-code"; repo = pname; - rev = "${pname}-${version}"; - sha256 = "sha256-rGZJyCWGk2RUr52ICp4dVER3JMBrnLdOMusRm/GG2PE="; + rev = "cargo-geiger@v${version}"; + hash = "sha256-/5yuayqneZV6aVQ6YFgqNS2XY3W6yETRQ0kE5ovc7p8="; }; - cargoHash = "sha256-B6Ka35y2fJEDVd891P60TNppr5HGFnzVjLhhfoFCYUA="; + cargoHash = "sha256-lhojo3dhsM9y1SxpVMH93yv+JeNfTL7VLsbTp9ErgIQ="; + + patches = [ + ./allow-warnings.patch + ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation Security libiconv curl ]); @@ -30,12 +34,18 @@ rustPlatform.buildRustPackage rec { # skip tests with networking or other failures checkFlags = [ + "--skip serialize_test1_quick_report" "--skip serialize_test2_quick_report" "--skip serialize_test3_quick_report" + "--skip serialize_test4_quick_report" "--skip serialize_test6_quick_report" + "--skip serialize_test7_quick_report" + "--skip serialize_test1_report" "--skip serialize_test2_report" "--skip serialize_test3_report" + "--skip serialize_test4_report" "--skip serialize_test6_report" + "--skip serialize_test7_report" # multiple test cases that time-out or cause memory leaks "--skip test_package" "--skip test_package_update_readme::case_2" @@ -45,7 +55,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { homepage = "https://github.com/rust-secure-code/cargo-geiger"; - changelog = "https://github.com/rust-secure-code/cargo-geiger/blob/${pname}-${version}/CHANGELOG.md"; + changelog = "https://github.com/rust-secure-code/cargo-geiger/blob/cargo-geiger-${version}/CHANGELOG.md"; description = "Detects usage of unsafe Rust in a Rust crate and its dependencies"; mainProgram = "cargo-geiger"; longDescription = '' @@ -55,6 +65,6 @@ rustPlatform.buildRustPackage rec { code is appropriate. ''; license = with licenses; [ asl20 /* or */ mit ]; - maintainers = with maintainers; [ evanjs jk matthiasbeyer ]; + maintainers = with maintainers; [ evanjs gepbird jk matthiasbeyer ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bbdbad05f58c..3102276d656b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16727,7 +16727,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { }; - cargo-geiger = callPackage ../development/tools/rust/cargo-geiger { }; cargo-hf2 = callPackage ../development/tools/rust/cargo-hf2 { inherit (darwin.apple_sdk.frameworks) AppKit;