depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix
Default email eaf6957cd3 Project import generated by Copybara.
GitOrigin-RevId: 4bb072f0a8b267613c127684e099a70e1f6ff106
2023-03-27 12:17:25 -07:00

30 lines
856 B
Nix

{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
rustPlatform.buildRustPackage rec {
pname = "cargo-zigbuild";
version = "0.16.4";
src = fetchFromGitHub {
owner = "messense";
repo = pname;
rev = "v${version}";
sha256 = "sha256-95cmmYHRS9BS+CtVE/sV2dwmoAk1EKJjX7NulKRuPLs=";
};
cargoSha256 = "sha256-5zdakF/6pDNWcAw8IXCe4Jl246V/Jdto1FPBFkKy6gg=";
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 ];
};
}