flake-compat icon indicating copy to clipboard operation
flake-compat copied to clipboard

Support fetching file type flakes

Open matthewbauer opened this issue 3 years ago • 4 comments

Add supports for new type = "file" locks added in https://github.com/NixOS/nix/commit/5b8c1deb18e0e6fc7a83fb8101cf5fc8dba38843.

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.

matthewbauer avatar Aug 26 '22 20:08 matthewbauer

Is this ready to merge? Would love to be able to use this

jakeisnt avatar Feb 20 '23 16:02 jakeisnt

Should be! cc @edolstra

matthewbauer avatar Feb 21 '23 18:02 matthewbauer

Hi, do you mind squashing all your commits? Then I will cherry-pick the patch into https://github.com/nix-community/flake-compat

zimbatm avatar Jun 23 '23 07:06 zimbatm

Doesn't this cause use of these inputs to be import-from-derivation? That doesn't seem desirable behaviour.

edolstra avatar Jun 23 '23 09:06 edolstra