Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 44 lines 1.1 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 replaceVars, 6 stdenv, 7}: 8 9rustPlatform.buildRustPackage rec { 10 pname = "cargo-benchcmp"; 11 version = "0.4.5"; 12 13 src = fetchFromGitHub { 14 owner = "BurntSushi"; 15 repo = "cargo-benchcmp"; 16 rev = version; 17 hash = "sha256-J8KFI0V/mOhUlYtVnFAQgPIpXL9/dLhOFxSly4bR00I="; 18 }; 19 20 cargoHash = "sha256-Dpn3MbU56zX4vibG0pw5LuQEwvC6Uqzse1GCRHWyAEw="; 21 22 patches = [ 23 # patch the binary path so tests can find the binary when `--target` is present 24 (replaceVars ./fix-test-binary-path.patch { 25 shortTarget = stdenv.hostPlatform.rust.rustcTarget; 26 }) 27 ]; 28 29 checkFlags = [ 30 # thread 'different_input_colored' panicked at 'assertion failed: `(left == right)` 31 "--skip=different_input_colored" 32 ]; 33 34 meta = with lib; { 35 description = "Small utility to compare Rust micro-benchmarks"; 36 mainProgram = "cargo-benchcmp"; 37 homepage = "https://github.com/BurntSushi/cargo-benchcmp"; 38 license = with licenses; [ 39 mit 40 unlicense 41 ]; 42 maintainers = with maintainers; [ figsoda ]; 43 }; 44}