From 39249c5956821e988f7c8782daa6f55a5e8f5e1a Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 5 Oct 2020 17:36:39 +0200 Subject: [PATCH] flake: Add build and eval functions --- flake.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index fe4d516..8388e0b 100644 --- a/flake.nix +++ b/flake.nix @@ -19,9 +19,17 @@ arion = import ./nix/arion.nix { inherit pkgs; }; }); + # Does not include the eval and build functions like you may expect from Nixpkgs. defaultPackage = lib.genAttrs systems (system: self.packages.${system}.arion ); + lib = { + eval = import ./src/nix/eval-composition.nix; + build = args@{...}: + let composition = self.lib.eval args; + in composition.config.out.dockerComposeYaml; + }; + }; }