2022-09-09 14:08:57 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-zigbuild";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.19.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "messense";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-1WTV6XqV9Y7d6WlH7rBb0Lfki6ftf+3z/azqQwzcOts=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
cargoHash = "sha256-Msi3V8mVnz9AqXdci79N9cbCouOyvVI4NdUAFP2IEsg=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/cargo-zigbuild \
|
|
|
|
--prefix PATH : ${zig}/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to compile Cargo projects with zig as the linker";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cargo-zigbuild";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://github.com/messense/cargo-zigbuild";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/messense/cargo-zigbuild/releases/tag/v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|