{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }: rustPlatform.buildRustPackage rec { pname = "cargo-zigbuild"; version = "0.18.0"; src = fetchFromGitHub { owner = "messense"; repo = pname; rev = "v${version}"; hash = "sha256-JZZJQGWPqb+jAqofEij/43ZZMOyT/2aU8rxmq72r0E4="; }; cargoHash = "sha256-PKfIQkLXq7gdg3wCqlue2UsaUP/jAz85JyoFjGwqwQY="; nativeBuildInputs = [ makeWrapper ]; postInstall = '' wrapProgram $out/bin/cargo-zigbuild \ --prefix PATH : ${zig}/bin ''; meta = with lib; { description = "A tool to compile Cargo projects with zig as the linker"; homepage = "https://github.com/messense/cargo-zigbuild"; changelog = "https://github.com/messense/cargo-zigbuild/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ figsoda ]; }; }