2022-09-09 14:08:57 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, makeWrapper, zig }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-zigbuild";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.18.4";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "messense";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-J9R/cT58wjvDcS5AKhGtbxbFYiNGFBmrLtIF2CfTIaE=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-F9QOlYpKAQx7xF6yyGa/tOkziEyXCg5LW6gH0X6uXRc=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
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";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|