lol
1{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "cargo-zigbuild";
5 version = "0.17.5";
6
7 src = fetchFromGitHub {
8 owner = "messense";
9 repo = pname;
10 rev = "v${version}";
11 hash = "sha256-x0TPbqwoCaXUlrjYQ47+x5KohsiK5yCrI2Q8yA2K8Zs=";
12 };
13
14 cargoHash = "sha256-FK6tTAbhP1f4VasG9HCahbMTDrJ9A6zXt/T6cs3HOZE=";
15
16 nativeBuildInputs = [ makeWrapper ];
17
18 postInstall = ''
19 wrapProgram $out/bin/cargo-zigbuild \
20 --prefix PATH : ${zig}/bin
21 '';
22
23 meta = with lib; {
24 description = "A tool to compile Cargo projects with zig as the linker";
25 homepage = "https://github.com/messense/cargo-zigbuild";
26 changelog = "https://github.com/messense/cargo-zigbuild/releases/tag/v${version}";
27 license = licenses.mit;
28 maintainers = with maintainers; [ figsoda ];
29 };
30}