Expose eval as nix attribute.
This allows using the nix portion of morph, without needing to know implementation details of where the nix expression is.
I'm not sure if the attributes exposed there want to be made public, or perhaps only some of them should be public.
Can you explain the use case a little more? I think that it's a little weird compared to using the (import morph.lib [...] directly, which already seems pretty simple. :)
Can you explain the use case a little more? I think that it's a little weird compared to using the
(import morph.lib [...]directly, which already seems pretty simple. :)
I took inspiration from arion (which has a similar function here). If/when this change is included into nixpkgs, one benefit is that using pkgs.morph.eval { inherit networkExpr; } instead of import "${pkgs.morph.lib}/eval-machines.nix" { inherit networkExpr; } is that the former will use the nixpkgs morph is pulled from, rather than whatever <nixpkgs> happens to point to.
Also, by having an explicit function be the interface for using morph from nix, rather than a file in the derivation, it isolates the user from how exactly morph is implemented and built.
I'll rebase this after #167 lands, since this re-indents default.nix.
I am happy with this, did you want to rebase? :smile_cat: