I have a flake with a subdirectory of packages, which are all scripts for the devshell of the flake. Some of them may need access to one or more of the flake’s inputs, but I can’t figure out how to get that to happen.
I tried it like this (terranix being a flake input here):
I cannot figure out why this isn’t working.
when inspecting this using the repl, It seems not to find any of the custom inputs that I added. It says it couldn’t find them (Function called without required argument "terranix"). It does work when I manually use callPackage without packagesFromDirectoryRecursive and import every single package on its own, giving the right args.
I have banged my head against this problem for about a day now and found (as far as i can tell) nothing that would point me in the right direction.
Is there any way i can give extra args to these packages in some way?
My mistake then, I didn’t check the nixpkgs lib code. If you pass newScope it develops the callPackage based off it, evidently:
So I presume you’d have to modify newScope itself rather than callPackage (again, untested, I’m not at my machine presently), which starts to look a bit more inelegant
If that still doesn’t work, we’ll need an example repo or such for us to replicate whatever you’re seeing, to be sure the error isn’t from some other code.