98eb3e9ef5
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
31 lines
886 B
Nix
31 lines
886 B
Nix
{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-zigbuild";
|
|
version = "0.19.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "messense";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-1WTV6XqV9Y7d6WlH7rBb0Lfki6ftf+3z/azqQwzcOts=";
|
|
};
|
|
|
|
cargoHash = "sha256-Msi3V8mVnz9AqXdci79N9cbCouOyvVI4NdUAFP2IEsg=";
|
|
|
|
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 ];
|
|
};
|
|
}
|