buildRustPackage fails at cargoInstallHook

Hi all, I’ve been trying to override the source of the alacritty package with this fork: alacritty-smooth-cursor

I’ve managed to cobble together an override from previous posts on discourse but I’m running into the bellow error:

Executing cargoInstallHook
Error at 600:3: Expected ``` and a newline to begin literal block

I’ve looked at the docks for buildRustPackage below, and if I understand it and my logs correctly, the package has built successfully, however its failing to install it to the nix store? : nixpkgs/doc/languages-frameworks/rust.section.md at 27ef4a3cd624034766e817853df917466de0200e · NixOS/nixpkgs · GitHub

Can post further logs from the failed build if needed, but i didn’t think they were relevant. Any info on how to fix this would be much appreciated!

Edit - forgot to add the overlay I’m using:

pkgs.alacritty.override (old: {
  rustPlatform = old.rustPlatform // {
    buildRustPackage = args: old.rustPlatform.buildRustPackage (args// {
      src = pkgs.fetchFromGitHub {
        owner = "GregTheMadMonk";
        repo = "alacritty-smooth-cursor";
        rev = "303a92ea57a074bb50ff016c8da7a0aeae897b1a";
        hash = "sha256-aoel3P7MnO39ekBJPaTnaizJkbUaOS7sy1ktwow9JN8=";
      };

      cargoHash = "sha256-2kLlB6YXZZYX+HtKcdjr9z9hh8AW54Dkc1bLWjueKVQ=";
    });
  };
});
Error at 600:3: Expected ``` and a newline to begin literal block

In case anyone runs into this again, it’s a manual (man) syntax error. In this case, it looks like the new source had a syntax error in its manual.

I ran into this while accidentally using a tilde in the nixos-rebuild manual (pkgs/by-name/ni/nixos-rebuild-ng/nixos-rebuild.8.scd). This fixed it:

I found the clue here

My educated guess is that the fork is missing the second set of ``` in a doc comment somewhere, and that cargo install tries to install documentation of some sort. It’s likely an upstream bug, presumably the author doesn’t notice since they don’t use their own documentation.

Can you share the rest of the build logs? You may need to add -L.