viperML / nh

Yet another nix cli helper
European Union Public License 1.2
847 stars 33 forks source link

[nixpkgs] nh.flake incorrectly identifying `.nix` folder as a nix file #136

Closed atagen closed 1 month ago

atagen commented 1 month ago

My flakes are in ~/.nix, which appears to fail one of the nix package's assertions.

viperML commented 1 month ago

I don't want to remove that check, so all I can tell you is to use a different folder.

atagen commented 1 month ago

looking at the module, would lib.pathIsDir work here?

viperML commented 1 month ago

No,that would be impure

atagen commented 1 month ago

I guess I can fix it for myself locally, but as a last ditch: what if the assertion checked for ending != /.nix && ending == .nix?

viperML commented 1 month ago

In linux, the path, filename or extensions doesn't carry any information about a file being regular or a folder.

atagen commented 1 month ago

that seems to be the root cause of the issue, yes. thanks anyway