depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

30 lines
852 B
Nix

{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
rustPlatform.buildRustPackage rec {
pname = "cargo-zigbuild";
version = "0.18.2";
src = fetchFromGitHub {
owner = "messense";
repo = pname;
rev = "v${version}";
hash = "sha256-qPoPDUx88fBRkxcwirIgGO9wivB/e7B7Yy55JOICvdM=";
};
cargoHash = "sha256-011FySv7BbfTB1uHWh916MvK1gXqbu8Bp38aEkUytqs=";
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 ];
};
}