-
-
Notifications
You must be signed in to change notification settings - Fork 83
Support fetching file type flakes #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Support fetching file type flakes #44
Conversation
Add supports for new type = "file" locks added in NixOS/nix@5b8c1de. Unfortunately, the hash provided by the lock file is a recursive hash, while fetchurl wants a flat hash. So we have to use a custom fetchurl function using the builtin:fetchurl builder. Hopefully okay just to add compat for this very useful lock type.
Add support for local files in addition to http / https.
so that fetchurl outputs a real path instead of a source, and our hashes match correctly between flake and non-flake. also it looks like fetchTarball can support local files
|
Is this ready to merge? Would love to be able to use this |
|
Should be! cc @edolstra |
|
Hi, do you mind squashing all your commits? Then I will cherry-pick the patch into https://github.com/nix-community/flake-compat |
|
Doesn't this cause use of these inputs to be import-from-derivation? That doesn't seem desirable behaviour. |
The goal here is that we have an ability to develop flake-compat and actually have tests and be able to validate it is correct. This also imports the file input stuff originally written by matthewbauer here: NixOS/flake-compat#44 This bore fruit already in the form of finding a years old bug lying around in Lix: https://git.lix.systems/lix-project/lix/issues/750
|
Could this be of use? It says "file at the path", but it supports the usual NAR-hashed directories too. |
Add supports for new type = "file" locks added in
NixOS/nix@5b8c1de.
Unfortunately, the hash provided by the lock file is a recursive hash,
while fetchurl wants a flat hash. So we have to use a custom fetchurl
function using the builtin:fetchurl builder. Hopefully okay just to
add compat for this very useful lock type.
cc @edolstra
Fixes #44.