diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/gi-crystal/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/gi-crystal/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/gi-crystal/default.nix b/nixpkgs/pkgs/development/tools/gi-crystal/default.nix new file mode 100644 index 000000000000..eee07206a2a1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/gi-crystal/default.nix @@ -0,0 +1,42 @@ +{ lib +, fetchFromGitHub +, crystal +, gobject-introspection +}: +crystal.buildCrystalPackage rec { + pname = "gi-crystal"; + version = "0.17.0"; + + src = fetchFromGitHub { + owner = "hugopl"; + repo = "gi-crystal"; + rev = "v${version}"; + hash = "sha256-DIH8L8P8lkWzzVUj1Tbf9oTUvu9X7OT66APyUHiDkYk="; + }; + + # 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 + ''; + + 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 ]; + }; +} |