astro / deadnix

Scan Nix files for dead code
GNU General Public License v3.0
512 stars 13 forks source link

Fix warning on nix lazy-trees branch #88

Closed Artturin closed 2 weeks ago

Artturin commented 1 month ago

warning: Performing inefficient double copy of path 'X' to the store. This can typically be avoided by rewriting an attribute likesrc = ./.tosrc = builtins.path { path = ./.; name = "source"; }.

astro commented 1 month ago

Or, just src = self;?

How can I reproduce that warning?

Artturin commented 1 month ago

Or, just src = self;?

Good idea.

How can I reproduce that warning?

You have to use this nix branch https://github.com/NixOS/nix/pull/6530