depot/third_party/nixpkgs/pkgs/development/tools/gi-crystal/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

48 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, crystal
, gobject-introspection
, gitUpdater
}:
crystal.buildCrystalPackage rec {
pname = "gi-crystal";
version = "0.22.2";
src = fetchFromGitHub {
owner = "hugopl";
repo = "gi-crystal";
rev = "v${version}";
hash = "sha256-JfBbKqobikpTGMryeO86zZ46EbOHybem+Cc5FZEL6i4=";
};
# Make sure gi-crystal picks up the name of the so or dylib and not the leading nix store path
# when the package name happens to start with “lib”.
patches = [ ./src.patch ./store-friendly-library-name.patch ];
nativeBuildInputs = [ gobject-introspection ];
buildTargets = [ "generator" ];
doCheck = false;
doInstallCheck = false;
installPhase = ''
runHook preInstall
mkdir $out
cp -r * $out
runHook postInstall
'';
passthru = {
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = with lib; {
description = "GI Crystal is a binding generator used to generate Crystal bindings for GObject based libraries using GObject Introspection";
homepage = "https://github.com/hugopl/gi-crystal";
mainProgram = "gi-crystal";
maintainers = with maintainers; [ sund3RRR ];
};
}