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

Make foliage repositories buildable in Nix #46

Open
michaelpj opened this issue Mar 27, 2023 · 2 comments
Open

Make foliage repositories buildable in Nix #46

michaelpj opened this issue Mar 27, 2023 · 2 comments

Comments

@michaelpj
Copy link
Collaborator

The main thing this would require is to be able to do all the fetching in a Nix-friendly way, which would require #45 and also some cleverness in working out what foliage needs, e.g. we might need something like:

$ foliage list-requirements
<url1> <hash1>
<url2> <hash2>
...

Then we could use IFD to make a derivation that prefetches everything into a directory, or use the intercepting-webserver trick.

@andreabedini
Copy link
Member

andreabedini commented Mar 28, 2023

💯

I have been thinking about this. Let's start with #45 first but in the meantime:

  • We need to figure out how to tell foliage where the fetched inputs are. Maybe just with a decent convention? Switch the cache to be content addressed?
  • Maybe we should integrate this into the metadata file and offer a way to produce it separately?

@michaelpj
Copy link
Collaborator Author

We need to figure out how to tell foliage where the fetched inputs are.

Yeah, this is a bit annoying. I think it would be fine to have the answer be "pre-populate the cache" or something. It's some Nix code that we have to write, mostly.

(Amusingly, this is actually a perfect case for recursive Nix (we replace curl with a script that calls fetchurl with the provided hash).)

Maybe we should integrate this into the metadata file and offer a way to produce it separately?

Not sure what "this" is? The "prefetched source location"? I do think we might want something like that, although I think we need a top-level metadata file really for some repository-level options. That might be useful anyway for things like "default value of signing/writing metadata" etc.

@michaelpj michaelpj changed the title Make foliage repositories buildable Nix Make foliage repositories buildable in Nix Apr 13, 2023
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

No branches or pull requests

2 participants