depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix
Default email 4d5a95770c Project import generated by Copybara.
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
2023-03-04 15:14:45 +03:00

30 lines
856 B
Nix

{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
rustPlatform.buildRustPackage rec {
pname = "cargo-zigbuild";
version = "0.16.2";
src = fetchFromGitHub {
owner = "messense";
repo = pname;
rev = "v${version}";
sha256 = "sha256-3PzzaZ62My+11yXGrQSWpJvKvbcKXMfy7CLDBnSVDuI=";
};
cargoSha256 = "sha256-ZnsrqbB89C4E5yBDN/wgNgpSEh/aS078h2X+ewtMX8E=";
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 ];
};
}