depot/third_party/nixpkgs/pkgs/development/tools/gir/default.nix
Default email eaf6957cd3 Project import generated by Copybara.
GitOrigin-RevId: 4bb072f0a8b267613c127684e099a70e1f6ff106
2023-03-27 12:17:25 -07:00

34 lines
930 B
Nix

{ lib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "gir";
version = "unstable-2021-11-21";
src = fetchFromGitHub {
owner = "gtk-rs";
repo = "gir";
rev = "a69abbe5ee1a745e554cac9433c65d2ac26a7688";
sha256 = "16ygy1bcbcj69x6ss72g9n62qlsd1bacr5hz91f8whw6qm9am46m";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"rustdoc-stripper-0.1.18" = "sha256-eQxAS76kV01whXK21PN5U+nkpvpn6r4VOoe9/pkuAQY=";
};
};
postPatch = ''
rm build.rs
sed -i '/build = "build\.rs"/d' Cargo.toml
echo "pub const VERSION: &str = \"$version\";" > src/gir_version.rs
'';
meta = with lib; {
description = "Tool to generate rust bindings and user API for glib-based libraries";
homepage = "https://github.com/gtk-rs/gir/";
license = with licenses; [ mit ];
maintainers = with maintainers; [ ekleog ];
mainProgram = "gir";
};
}