Skip to content
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

Support fetching file type flakes #44

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

matthewbauer
Copy link
Contributor

@matthewbauer matthewbauer commented Aug 26, 2022

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.

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
@jakeisnt
Copy link

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

@matthewbauer
Copy link
Contributor Author

Should be! cc @edolstra

0z13 added a commit to 0z13/flake-compat that referenced this pull request Mar 16, 2023
@zimbatm
Copy link
Contributor

zimbatm commented Jun 23, 2023

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

@edolstra
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants