cargo-geiger: 0.9.1 -> 0.10.2

* Remove cargo-lock.patch
  * Upstream crate now compiles fine without patch

* Use cargo-insta for testing
  * Using cargo-insta for testing, we can now run the test suite without
    skipping any tests
This commit is contained in:
Evan Stoll
2020-12-07 10:57:14 -05:00
parent e9a431d343
commit 8949b189a6
2 changed files with 6 additions and 336 deletions
@@ -1,38 +1,26 @@
{ stdenv, lib, fetchFromGitHub
, rustPlatform, pkgconfig, openssl
# testing packages
, cargo-insta
# darwin dependencies
, Security, CoreFoundation, libiconv
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-geiger";
version = "0.9.1";
version = "0.10.2";
src = fetchFromGitHub {
owner = "rust-secure-code";
repo = pname;
rev = "${pname}-${version}";
sha256 = "0kvmjahyx5dcjhry2hkvcshi0lbgipfj0as74a3h3bllfvdfkkg0";
sha256 = "1z920p8i3gkjadyd6bqjk4i5yr5ds3m3sbcnf7plcqr69dsjr4b8";
};
cargoSha256 = "0v50fkyf0a77l7whxalwnfqfi8lxy82z2gpd0fa0ib80qjla2n5z";
cargoPatches = [ ./cargo-lock.patch ];
cargoSha256 = "1zh6fjfynkn4kgk1chigzd0sh4x1bagizyn7x6qyxgzc57a49bp7";
# Multiple tests require internet connectivity, so they are disabled here.
# If we ever get cargo-insta (https://crates.io/crates/insta) in tree,
# we might be able to run these with something like
# `cargo insta review` in the `preCheck` phase.
checkPhase = ''
cd cargo-geiger/tests/snapshots
for file in *
do
mv $file r#$file
done
cd -
cargo test -- \
--skip test_package::case_2 \
--skip test_package::case_3 \
--skip test_package::case_6
${cargo-insta}/bin/cargo-insta test
'';
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];