mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
903 B
Nix
38 lines
903 B
Nix
{ lib, fetchFromGitHub, rustPlatform }:
|
|
|
|
let
|
|
version = "0.17.1";
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "gir";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gtk-rs";
|
|
repo = "gir";
|
|
rev = version;
|
|
sha256 = "sha256-WpTyT62bykq/uwzBFQXeJ1HxR1a2vKmtid8YAzk7J+Q=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"rustdoc-stripper-0.1.18" = "sha256-b+RRXJDGULEvkIZDBzU/ZchVF63pX0S9hBupeP12CkU=";
|
|
};
|
|
};
|
|
|
|
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";
|
|
};
|
|
}
|