depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

31 lines
886 B
Nix

{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
rustPlatform.buildRustPackage rec {
pname = "cargo-zigbuild";
version = "0.19.3";
src = fetchFromGitHub {
owner = "messense";
repo = pname;
rev = "v${version}";
hash = "sha256-fVsYQjv+DjGCWv/dAk8S8GcEtDIdaxb1yXAqCpTm0sQ=";
};
cargoHash = "sha256-R5jv8hFHdhS6MoU5oHleN5B7k2RPX7GhJMwym8kYAYY=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/cargo-zigbuild \
--prefix PATH : ${zig}/bin
'';
meta = with lib; {
description = "Tool to compile Cargo projects with zig as the linker";
mainProgram = "cargo-zigbuild";
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 ];
};
}