Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, rustPlatform 3, fetchFromGitHub 4, pkg-config 5, libgit2 6, openssl 7, zlib 8, stdenv 9, darwin 10, git 11}: 12 13rustPlatform.buildRustPackage rec { 14 pname = "cargo-semver-checks"; 15 version = "0.20.1"; 16 17 src = fetchFromGitHub { 18 owner = "obi1kenobi"; 19 repo = pname; 20 rev = "v${version}"; 21 sha256 = "sha256-pDyF8KCgAhugzTuMSVqfCda5kRAvJwR+OF+G+ZfjeDo="; 22 }; 23 24 cargoSha256 = "sha256-zbraVGjEayJJcBH9/GVnTcQGLcNgxaRhbgdJeHCGEEo="; 25 26 nativeBuildInputs = [ pkg-config ]; 27 28 buildInputs = [ 29 libgit2 30 openssl 31 zlib 32 ] ++ lib.optionals stdenv.isDarwin [ 33 darwin.apple_sdk.frameworks.Security 34 ]; 35 36 nativeCheckInputs = [ 37 git 38 ]; 39 40 checkFlags = [ 41 # requires nightly version of cargo-rustdoc 42 "--skip=both_passing_manifest_path_and_directory_works" 43 "--skip=rustdoc_cmd::tests" 44 "--skip=verify_binary_contains_lints" 45 46 # requires internet access 47 "--skip=detects_target_dependencies" 48 ]; 49 50 preCheck = '' 51 patchShebangs scripts/regenerate_test_rustdocs.sh 52 git init 53 scripts/regenerate_test_rustdocs.sh 54 ''; 55 56 # use system openssl 57 OPENSSL_NO_VENDOR = true; 58 59 meta = with lib; { 60 description = "A tool to scan your Rust crate for semver violations"; 61 homepage = "https://github.com/obi1kenobi/cargo-semver-checks"; 62 changelog = "https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v${version}"; 63 license = with licenses; [ mit /* or */ asl20 ]; 64 maintainers = with maintainers; [ figsoda matthiasbeyer ]; 65 }; 66}