this post was submitted on 17 Nov 2023
0 points (50.0% liked)

Nix

10 readers
1 users here now

founded 1 year ago
MODERATORS
 

I've been seeing that nix develop takes a very long time on large projects, and I believe it's due to the whole folder being copied to the store.

nix-shell doesn't have this problem, but I need flakes specifically because they allow to have runtime libraries, which shell doesn't seem to support. (Translating flake.nix to a shell.nix exactly has different execution results.)

What can I do? I've tried putting the flake.nix on an empty subfolder, and it solves it, but it's extremely tedious and clunky.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 1 year ago

I believe it's due to the whole folder being copied to the store.

Yep. There's work ongoing to alleviate this but for now it's a fundamental problem with flakes.

but I need flakes specifically because they allow to have runtime libraries, which shell doesn't seem to support. (Translating flake.nix to a shell.nix exactly has different execution results.)

I don't understand. There's nothing you can do with nix develop that you can't do with nix-shell. What do you mean "allow to have runtime libraries"? That's just buildInputs, which is the same regardless of flakes.