oxalica / nil

NIx Language server, an incremental analysis assistant for writing in Nix.
Apache License 2.0
1.28k stars 39 forks source link

`nix profile install --override-inputs` fails with "Git changes are not committed" #119

Closed SandaruKasa closed 7 months ago

SandaruKasa commented 7 months ago

I usually install Nix stuff using

$ nix -Lv profile install --override-input nixpkgs nixpkgs <...>

to avoid having to pull a new version of nixpkgs (and its packages) each time and then ending up depending on 10 different version of glibc.

However, trying to install nil this way gives me an error.

The culprit is this line: https://github.com/oxalica/nil/blob/0031eb4343fd4672742fd6ff839da9b4f5120646/flake.nix#L19

It makes it a hard error to build the package when the git tree is dirty (and --override-inputs makes it dirty).

This may be relaxed by using

 rev = self.rev or self.dirtyRev;

but I'm not sure if this is a desired behavior for this project, thus I am submitting an issue and not a PR.

oxalica commented 7 months ago

dirtyRev

TIL. Thanks.