summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-01-23 04:09:15 +0100
committerGitHub <noreply@github.com>2022-01-23 04:09:15 +0100
commit7800a323ce1f44aa0dd2e66c895cf25fb43b57aa (patch)
tree90ddd8b0801fc90793c1741d59e8065986fe0a4c /pkgs/development/tools
parentd5d0a3c49689599340da3b6961c15c6698a3f494 (diff)
parentaab745deddb5bf27a34fcd6bc21a79d107037019 (diff)
downloadnixpkgs-7800a323ce1f44aa0dd2e66c895cf25fb43b57aa.tar
nixpkgs-7800a323ce1f44aa0dd2e66c895cf25fb43b57aa.tar.gz
nixpkgs-7800a323ce1f44aa0dd2e66c895cf25fb43b57aa.tar.bz2
nixpkgs-7800a323ce1f44aa0dd2e66c895cf25fb43b57aa.tar.lz
nixpkgs-7800a323ce1f44aa0dd2e66c895cf25fb43b57aa.tar.xz
nixpkgs-7800a323ce1f44aa0dd2e66c895cf25fb43b57aa.tar.zst
nixpkgs-7800a323ce1f44aa0dd2e66c895cf25fb43b57aa.zip
Merge pull request #156104 from 06kellyjac/cargo-geiger
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/rust/cargo-geiger/default.nix40
-rwxr-xr-xpkgs/development/tools/rust/cargo-geiger/update-cargo-lock.sh19
2 files changed, 28 insertions, 31 deletions
diff --git a/pkgs/development/tools/rust/cargo-geiger/default.nix b/pkgs/development/tools/rust/cargo-geiger/default.nix
index bd71a14b4a0..28511223be0 100644
--- a/pkgs/development/tools/rust/cargo-geiger/default.nix
+++ b/pkgs/development/tools/rust/cargo-geiger/default.nix
@@ -1,27 +1,20 @@
 { stdenv, lib, fetchFromGitHub
 , rustPlatform, pkg-config, openssl
-# testing packages
-, cargo-insta
 # darwin dependencies
 , Security, CoreFoundation, libiconv
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-geiger";
-  version = "0.10.2";
+  version = "0.11.2";
 
   src = fetchFromGitHub {
     owner = "rust-secure-code";
     repo = pname;
     rev = "${pname}-${version}";
-    sha256 = "1z920p8i3gkjadyd6bqjk4i5yr5ds3m3sbcnf7plcqr69dsjr4b8";
+    sha256 = "sha256-KkOLDSnLneal3m+CrYKKIoeO61rjXEDq4GK3kPwQxj4=";
   };
-
-  cargoSha256 = "1wf9758gyaxgyajjzy5phirg922n9wv0qmy67zjmxj56ayf0l9lm";
-
-  checkPhase = ''
-    ${cargo-insta}/bin/cargo-insta test
-  '';
+  cargoSha256 = "sha256-i7xDEzZAN2ubW1Q6MhY+xsb9XiUajNDHLdtDuO5r6jA=";
 
   buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
   nativeBuildInputs = [ pkg-config ];
@@ -33,10 +26,33 @@ rustPlatform.buildRustPackage rec {
     export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE"
   '';
 
+  # skip tests with networking or other failures
+  checkFlags = [
+    "--skip serialize_test2_quick_report"
+    "--skip serialize_test3_quick_report"
+    "--skip serialize_test6_quick_report"
+    "--skip serialize_test2_report"
+    "--skip serialize_test3_report"
+    "--skip serialize_test6_report"
+    "--skip test_package::case_2"
+    "--skip test_package::case_3"
+    "--skip test_package::case_6"
+    "--skip test_package_update_readme::case_2"
+    "--skip test_package_update_readme::case_3"
+    "--skip test_package_update_readme::case_5"
+  ];
+
   meta = with lib; {
-    description = "Detects usage of unsafe Rust in a Rust crate and its dependencies";
     homepage = "https://github.com/rust-secure-code/cargo-geiger";
+    changelog = "https://github.com/rust-secure-code/cargo-geiger/blob/${pname}-${version}/CHANGELOG.md";
+    description = "Detects usage of unsafe Rust in a Rust crate and its dependencies";
+    longDescription = ''
+      A cargo plugin that detects the usage of unsafe Rust in a Rust crate and
+      its dependencies. It provides information to aid auditing and guide
+      dependency selection but it can not help you decide when and why unsafe
+      code is appropriate.
+    '';
     license = with licenses; [ asl20 /* or */ mit ];
-    maintainers = with maintainers; [ evanjs ];
+    maintainers = with maintainers; [ evanjs jk ];
   };
 }
diff --git a/pkgs/development/tools/rust/cargo-geiger/update-cargo-lock.sh b/pkgs/development/tools/rust/cargo-geiger/update-cargo-lock.sh
deleted file mode 100755
index 6e077c6733f..00000000000
--- a/pkgs/development/tools/rust/cargo-geiger/update-cargo-lock.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# This updates cargo-lock.patch for the diesel version listed in default.nix.
-
-set -eu -o verbose
-
-here=$PWD
-version=$(cat default.nix | grep '^  version = "' | cut -d '"' -f 2)
-checkout=$(mktemp -d)
-git clone -b "cargo-geiger-$version" --depth=1 https://github.com/rust-secure-code/cargo-geiger "$checkout"
-cd "$checkout"
-
-rm -f rust-toolchain
-cargo generate-lockfile
-git add -f Cargo.lock
-git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
-
-cd "$here"
-rm -rf "$checkout"