flake: Add build and eval functions

This commit is contained in:
Robert Hensing 2020-10-05 17:36:39 +02:00
parent 8cb231fa89
commit 39249c5956

View file

@ -19,9 +19,17 @@
arion = import ./nix/arion.nix { inherit pkgs; }; 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: defaultPackage = lib.genAttrs systems (system:
self.packages.${system}.arion 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;
};
}; };
} }