From fcf2866023abcf971f9aa21a795cb6fef57627b5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 8 Feb 2016 14:30:24 +0100 Subject: lib/call-machine: Introduce .build shortcut The shortcut is mainly to make things a bit easier, instead of: nix-build '' \ -A aszlig.tishtushi.eval.config.system.build.toplevel We can now do something like this: nix-build '' \ -A aszlig.tishtushi.build ... in order to get a system store path out of a machine definition. This also fixes an evaluation error in the top-level default.nix. Thanks to @Profpatsch for bringing this to my attention. Signed-off-by: aszlig --- default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index f2ea79e2..a6ac9441 100644 --- a/default.nix +++ b/default.nix @@ -3,9 +3,10 @@ with (import (import ./nixpkgs-path.nix) { inherit system; }).lib; { - machines = mapAttrsRecursiveCond (m: !(m ? build)) (path: attrs: - attrs.build.config.system.build.toplevel - ) (import ./machines { inherit system; }); + machines = let + getBuild = const (getAttr "build"); + allMachines = import ./machines { inherit system; }; + in mapAttrsRecursiveCond (m: !(m ? eval)) getBuild allMachines; pkgs = import ./pkgs { pkgs = import (import ./nixpkgs-path.nix) args; -- cgit 1.4.1