Error When Installing Ghostty via nix-env

I am using LMDE 6 and installed through the multi-user installation script. When I execute nix-env -iA nixpkgs.**ghostty it fetches and copies the files but then exits with the following error:

error: Unable to build profile. There is a conflict for the following files:

/nix/store/ijbbn9d0j4jp00njldzwp7cq0lzbgw3r-ghostty-1.1.3-terminfo/share/terminfo/g/ghostty
/nix/store/ijbbn9d0j4jp00njldzwp7cq0lzbgw3r-ghostty-1.1.3-terminfo/share/terminfo/g/ghostty
error: builder for '/nix/store/g4vzsvq8pc8qsnjklhrdi1s66dyjx688-user-environment.drv' failed with exit code 1;
       last 4 log lines:
       > error: Unable to build profile. There is a conflict for the following files:
       >
       >      /nix/store/ijbbn9d0j4jp00njldzwp7cq0lzbgw3r-ghostty-1.1.3-terminfo/share/terminfo/g/ghostty
       >          /nix/store/ijbbn9d0j4jp00njldzwp7cq0lzbgw3r-ghostty-1.1.3-terminfo/share/terminfo/g/ghostty
       For full logs, run:
         nix-store -l /nix/store/g4vzsvq8pc8qsnjklhrdi1s66dyjx688-user-environment.drv

From here I am uncertain how to proceed and any guidance would be appreaciated.

Thank you for your time.

looks like you already have ghostty in your profile

It happens on a clean install. So maybe there is something goofy with the packaging?

Weird syntax, why the **?
Also I suggest not using nix-env, even nix profile install nixpkgs#ghostty would be better. (If you don’t have flakes on, you’d need --experimental-features "nix-command flakes" too.)

https://stop-using-nix-env.privatevoid.net/

Actually hmm ghostty errors even with nix profile, package must be seriously broken. Report it on github at https://github.com/NixOS/nixpkgs/issues if no one else has.

As a workaround you can explicitly specify the output, e.g. nix profile install 'nixpkgs#ghostty^out'. I have no idea about the equivalent nix-env command, I avoid it like the plague.

1 Like

Thanks, I will report it when I am off work.