Profpatsch / libnix-haskell

Haskell library to interface with the nix package manager
GNU General Public License v3.0
25 stars 2 forks source link

Bulk actions #4

Open chris-martin opened 4 years ago

chris-martin commented 4 years ago

The nix-instantiate and nix-store --realise commands are both able to accept a list of arguments to instantiate or realize multiple derivations at once. For situations where one has a list of things to build, might it afford better performance to have bulk operations like these?

instantiateMany :: [NixExpr] -> NixAction InstantiateError [StorePath Derivation]

realizeMany :: [StorePath Derivation] -> NixAction RealizeError [StorePath Realized]

I'm considering trying to write these functions, but I'm curious whether you might have any insight first on whether it seems like a worthwhile effort.

Profpatsch commented 3 years ago

I haven’t done anything on this project in a long time, but I’m accepting contributions.

The Shellout module should probably support as many use-cases as possible. We can also make changes to the interface.