256lights / zb

An experiment in hermetic, reproducible build systems
MIT License
183 stars 3 forks source link

Allow importing Nix derivations #2

Open zombiezen opened 4 months ago

zombiezen commented 4 months ago

This should be possible by shelling out to nix-instantiate and collecting derivation paths. I'd imagine there would be a built-in function like:

---Import derivations from Nix.
---@param ... string[] A list of Nix flake installables
---@return table<string, derivation>
function nixInstallables(...) end
zombiezen commented 1 month ago

After #5, this is now more complex because I have intentionally started using a separate store directory. I'm not sure how (or if) I want to approach cross-store references.