2022-09-07 18:30:38 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-zigbuild";
|
2023-02-10 15:21:09 +00:00
|
|
|
version = "0.16.0";
|
2022-09-07 18:30:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "messense";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-10 15:21:09 +00:00
|
|
|
sha256 = "sha256-ITevZv/4Q21y3o9N4WSqD2vONQfNEXKHE/Af/f6T8vw=";
|
2022-09-07 18:30:38 +00:00
|
|
|
};
|
|
|
|
|
2023-02-10 15:21:09 +00:00
|
|
|
cargoSha256 = "sha256-e5MIaX4R/z41x11SyZaiOERokCllC10J+rLra2I1N9c=";
|
2022-09-07 18:30:38 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/cargo-zigbuild \
|
|
|
|
--prefix PATH : ${zig}/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-09-08 14:15:56 +00:00
|
|
|
description = "A tool to compile Cargo projects with zig as the linker";
|
2022-09-07 18:30:38 +00:00
|
|
|
homepage = "https://github.com/messense/cargo-zigbuild";
|
2022-11-30 06:02:40 +00:00
|
|
|
changelog = "https://github.com/messense/cargo-zigbuild/releases/tag/v${version}";
|
2022-09-07 18:30:38 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|