{
  lib,
  rustPlatform,
  fetchFromGitea,
}:

rustPlatform.buildRustPackage rec {
  pname = "mergiraf";
  version = "0.5.1";

  doCheck = false;

  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = "mergiraf";
    repo = "mergiraf";
    rev = "v${version}";
    hash = "sha256-CiZG0O5F2sidInSFUtB1q5GSfTIjX9xUr52y0TZ5tDs=";
  };

  cargoHash = "sha256-32DXHg0xVfUID8/jFNm3gowjOwCOsXH9sXDGM5yK7sA=";

  meta = {
    description = "A syntax-aware git merge driver for a growing collection of programming languages and file formats";
    homepage = "https://codeberg.org/mergiraf/mergiraf/releases";
    license = lib.licenses.gpl3Only;
    mainProgram = "mergiraf";
  };
}
