{
  lib,
  rustPlatform,
  fetchFromGitea,
}:

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

  doCheck = false;

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

  cargoHash = "sha256-Rr59x+/sDA0ttkVZh7hVhnvkNogQj9q9aXomNjHIXII=";

  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";
  };
}
