An OSTree repository is similar to a git repository, but instead of containing source files, ostree’s repos contain a filesystem. In other words, ostree is a content-addressed versioning filesystem.
OSTree is used by flatpak to manage runtimes and SDKs.
Supporting OSTree repos means being able to reuse the files inside the flatpaks published on flathub and also means facilitating the build of flatpaks using nix.
Nix already offers a way to fetch git repositories. My idea is to add support for ostree repositories as well.
OSTree repositories are hosted by a simple http server. Adding support for them means having a fetcher to fetch all the files hosted inside an ostree repo, using http.
Now, nix can already fetch files from http using
fetchurl, but an OSTree repo has a lot of files, so fetching all of them one by one is pretty cumbersome. Maybe adding a way to fetch multiple files at once, without specifying the hash of each of them, is enough. We could have a fetcher
fetchMultipleFiles taking a list of paths and a single final hash.
Now, could we add the fetcher
fetchMultipleFiles? What do you think about it?