{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }: rustPlatform.buildRustPackage rec { pname = "cargo-zigbuild"; version = "0.16.7"; src = fetchFromGitHub { owner = "messense"; repo = pname; rev = "v${version}"; sha256 = "sha256-XMlmggT0L9F3J8/WA6AUZTnpCzyZTtb7feKDabPvW/Y="; }; cargoSha256 = "sha256-OLMKvB7l29vM/n59dklyEXT5DXvImYKc3EdwnPVY968="; 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 ]; }; }