2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform }:
|
2019-10-20 19:57:53 +00:00
|
|
|
|
2023-03-20 03:07:11 +00:00
|
|
|
let
|
|
|
|
version = "0.17.1";
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
2019-10-20 19:57:53 +00:00
|
|
|
pname = "gir";
|
2023-03-20 03:07:11 +00:00
|
|
|
inherit version;
|
2019-10-20 19:57:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gtk-rs";
|
|
|
|
repo = "gir";
|
2023-03-20 03:07:11 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-WpTyT62bykq/uwzBFQXeJ1HxR1a2vKmtid8YAzk7J+Q=";
|
2019-10-20 19:57:53 +00:00
|
|
|
};
|
|
|
|
|
2023-03-25 23:16:46 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2023-03-20 03:07:11 +00:00
|
|
|
"rustdoc-stripper-0.1.18" = "sha256-b+RRXJDGULEvkIZDBzU/ZchVF63pX0S9hBupeP12CkU=";
|
2023-03-25 23:16:46 +00:00
|
|
|
};
|
|
|
|
};
|
2021-11-30 21:41:01 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm build.rs
|
|
|
|
sed -i '/build = "build\.rs"/d' Cargo.toml
|
|
|
|
echo "pub const VERSION: &str = \"$version\";" > src/gir_version.rs
|
|
|
|
'';
|
2019-10-20 19:57:53 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-20 19:57:53 +00:00
|
|
|
description = "Tool to generate rust bindings and user API for glib-based libraries";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/gtk-rs/gir/";
|
2019-10-20 19:57:53 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ ekleog ];
|
2021-10-08 19:13:29 +00:00
|
|
|
mainProgram = "gir";
|
2019-10-20 19:57:53 +00:00
|
|
|
};
|
|
|
|
}
|