Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, fetchFromGitHub, makeRustPlatform, rustc, cargo, installShellFiles, stdenv }: 2 3let 4 args = rec { 5 pname = "cargo-auditable"; 6 version = "0.6.1"; 7 8 src = fetchFromGitHub { 9 owner = "rust-secure-code"; 10 repo = pname; 11 rev = "v${version}"; 12 sha256 = "sha256-MKMPLv8jeST0l4tq+MMPC18qfZMmBixdj6Ng19YKepU="; 13 }; 14 15 cargoSha256 = "sha256-6/f7pNaTL+U6bI6jMakU/lfwYYxN/EM3WkKZcydsyLk="; 16 17 # Cargo.lock is outdated 18 preConfigure = '' 19 cargo update --offline 20 ''; 21 22 meta = with lib; { 23 description = "A tool to make production Rust binaries auditable"; 24 homepage = "https://github.com/rust-secure-code/cargo-auditable"; 25 changelog = "https://github.com/rust-secure-code/cargo-auditable/blob/v${version}/cargo-auditable/CHANGELOG.md"; 26 license = with licenses; [ mit /* or */ asl20 ]; 27 maintainers = with maintainers; [ figsoda ]; 28 broken = stdenv.hostPlatform != stdenv.buildPlatform; 29 }; 30 }; 31 32 rustPlatform = makeRustPlatform { 33 inherit rustc; 34 cargo = cargo.override { 35 auditable = false; 36 }; 37 }; 38 39 bootstrap = rustPlatform.buildRustPackage (args // { 40 auditable = false; 41 }); 42in 43 44rustPlatform.buildRustPackage.override { cargo-auditable = bootstrap; } (args // { 45 nativeBuildInputs = [ 46 installShellFiles 47 ]; 48 49 postInstall = '' 50 installManPage cargo-auditable/cargo-auditable.1 51 ''; 52 53 passthru = { 54 inherit bootstrap; 55 }; 56})