Hi all,
I think I have a misunderstanding about how flakes are meant to work. I have a flake that has another flake as an input (mach-nix @ GitHub - DavHau/mach-nix: Create highly reproducible python environments). mach-nix itself has other dependencies on other flakes, in particular “pypi-deps-db” (which is a non-flake dependency - I don’t know if that’s important):
inputs.pypi-deps-db = {
url = "github:DavHau/pypi-deps-db";
flake = false;
};
The problem (/ misunderstanding) that I’m having is that when I run nix flake update
my flake.lock
gets updated with the newest version of mach-nix
, i.e. my first-level dependency. However, mach-nix
's dependencies do not get updated: instead, they remain set to whatever is in mach-nix
's most recent lock file.
This isn’t what I expected - I thought that, by analog with other package managers like e.g. npm, only the flake.lock
in the highest level repository would be read, and that dependent flakes only have their inputs read from flake.nix
. Having nix read dependencies’ flake.lock
seems like a recipe for getting lots of collisions, which is exactly the problem I’m trying to debug.
Is there a way to do what I want? Or am I misunderstanding the role of flakes?