On the command-line, I can build a flake with my current revision of nixpkgs with
nix build --override-input nixpkgs /home/aengelen/nixpkgs
Is it possible to do the same inside a derivation that uses
builtins.getFlake? Instead of:
… I could perhaps put some kind of override or repackaging before invoking
Is the call to
builtins.getFlake your code?
If instead it was listed as
inputs.vola.url = ... you could override it in the same way you override
Yes, I’m using it to include a flake-packaged application in my (‘classic’)
configuration.nix, and elsewhere as part of an
mkShell that is invoked with
Yeah basically that’s your only option right now.
Basically, you have to fetch the original flake using fetchgit and apply a patch to that inserts
inputs.nixpkgs.follows = "/home/aengelen/nixpkgs"; in one derivation, and then use the output path of that derivation as the input to getFlake. This will work because getFlake happily accepts a local path to a flake.
Is that enough info for you to get started?
What solution have you settled on? Fetching the flake and then patching the source?
For now I’m just using a local checkout of the flake where I have flake.lock in sync with the current nixpkgs on that system. Obviously less than ideal .