about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-04-15 17:44:49 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-04-15 17:44:49 +0200
commitddf8c41e9107911d0979c2747791aca859dd0362 (patch)
tree5fc01221432349858c68044de0aa9aafccf2afab
parent418537a3628fc6c21b3dc2949c114b1a27dd2768 (diff)
Add a default.nix which servers as vuizvui root.
In the end we want to have something like (import <vuizvui> {}), which
exports all stuff we need for building machines, packages, providing
custom helper functions and much more. And all that by using a channel
instead of setting NIX_PATH directly :-)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r--default.nix16
-rw-r--r--release.nix4
2 files changed, 17 insertions, 3 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 00000000..c85ef72a
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,16 @@
+{ system ? builtins.currentSystem, ... }@args:
+
+with (import <nixpkgs> { inherit system; }).lib;
+
+{
+  machines = mapAttrsRecursiveCond (m: !(m ? build)) (path: attrs:
+    attrs.build.config.system.build.toplevel
+  ) (import ./machines { inherit system; });
+
+  pkgs = import ./pkgs {
+    pkgs = import <nixpkgs> args;
+  };
+
+  # Inherit upstream lib until we have our own lib.
+  lib = import <nixpkgs/lib>;
+}
diff --git a/release.nix b/release.nix
index df290475..5dd77653 100644
--- a/release.nix
+++ b/release.nix
@@ -19,9 +19,7 @@ in with pkgsUpstream.lib; with builtins; {
   pkgs = let
     releaseLib = import <nixpkgs/pkgs/top-level/release-lib.nix> {
       inherit supportedSystems;
-      packageSet = attrs: (import ./pkgs {
-        pkgs = import <nixpkgs> attrs;
-      }) // { inherit (pkgsUpstream) lib; };
+      packageSet = attrs: (import ./default.nix attrs).pkgs;
     };
   in with releaseLib; mapTestOn (packagePlatforms releaseLib.pkgs);