MatrixAI / Emergence

Distributed Infrastructure Orchestration
Apache License 2.0
1 stars 0 forks source link

Binding into Nix #44

Open CMCDragonkai opened 5 years ago

CMCDragonkai commented 5 years ago

Since we want to investigate the usage of Nix within our Artifact expressions in order to translate such things into OCI containers eventually, we will need some way of interacting with the Nix system to run the build instructions and make use of Nix's dependency graph.

To do so, we need to have an understanding of the Nix language and understanding of Nix commands/libraries.

The first is being addressed by Architect work https://github.com/MatrixAI/Architect/issues/14 and was previously discussed in https://github.com/MatrixAI/Emergence/issues/24

The second is being addressed in terms of binding into Nix. We are looking into the library libnix https://github.com/Profpatsch/libnix-haskell

It provides bindings into the Nix commands/ecosystem by first wrapping exec calls to the Nix CLI commands, and a long term goal of binding into the Nix C++ codebase (for a deeper integration).

@n-zhang-hp is currently working on integrating libnix atm (with some build issues: https://github.com/Profpatsch/libnix-haskell/issues/1).

In the future, we will investigate the binding into the Nix C++ codebase: