about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2017-11-12 17:37:53 +0100
committeraszlig <aszlig@nix.build>2017-11-12 17:49:31 +0100
commit2a09a44a4494e54a03ce891e9c92cc6542f74227 (patch)
treeee9325462fa7fda37e1e46cfeb8008b08eb28e97
parentfa56aefe3944ab484d1da82f42e9cdb5352541c7 (diff)
pkgs: Remove the vuizvui namespace
It's a bit weird to need to write something like this:

nix-build pkgs -A vuizvui.aszlig.vim

We're already within vuizvui, and the filesystem paths are already
structured in a way so that the above is in pkgs/aszlig/vim, so the need
to add the vuizvui attribute to that seems quite pointless and
unnatural.

I have tested this by evaluating a few machines, tests and packages.

Signed-off-by: aszlig <aszlig@nix.build>
-rw-r--r--modules/core/common.nix12
-rw-r--r--pkgs/default.nix2
-rw-r--r--release.nix4
3 files changed, 7 insertions, 11 deletions
diff --git a/modules/core/common.nix b/modules/core/common.nix
index f19b5119..f394b038 100644
--- a/modules/core/common.nix
+++ b/modules/core/common.nix
@@ -35,14 +35,10 @@ with lib;
     };
   };
 
-  config = let
-    nixpkgs = import ../../nixpkgs-path.nix;
-    system = config.nixpkgs.system;
-
-  in {
+  config = {
     # Expose all packages in ../../pkgs as pkgs.vuizvui in modules.
-    nixpkgs.overlays = singleton (self: const {
-      inherit (import ../../pkgs { pkgs = self; }) vuizvui;
+    nixpkgs.overlays = singleton (pkgs: const {
+      vuizvui = import ../../pkgs { inherit pkgs; };
     });
 
     nix.binaryCaches = options.nix.binaryCaches.default ++ [
@@ -65,7 +61,7 @@ with lib;
       channelPath = "${rootChannelsPath}/${config.vuizvui.channelName}";
       nixosConfig = "/etc/nixos/configuration.nix";
       nixpkgsConfig = "nixpkgs-config=${pkgs.writeText "nixpkgs-config.nix" ''
-        (import ${nixpkgs}/nixos/lib/eval-config.nix {
+        (import ${pkgs.path}/nixos/lib/eval-config.nix {
           modules = [ ${nixosConfig} ];
         }).config.nixpkgs.config
       ''}";
diff --git a/pkgs/default.nix b/pkgs/default.nix
index ce39a5bc..e2e09840 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -25,4 +25,4 @@ let
     profpatsch = callPackageScope ./profpatsch;
     sternenseemann = callPackageScope ./sternenseemann;
   };
-in pkgs // self
+in self.vuizvui
diff --git a/release.nix b/release.nix
index b71ad0c3..08ff74c8 100644
--- a/release.nix
+++ b/release.nix
@@ -51,7 +51,7 @@ let
     noGames = flip removeAttrs [ "games" ];
     releaseLib = import "${nixpkgs}/pkgs/top-level/release-lib.nix" {
       inherit supportedSystems;
-      packageSet = attrs: noGames (import vuizvui attrs).pkgs.vuizvui;
+      packageSet = attrs: noGames (import vuizvui attrs).pkgs;
     };
 
     packagePlatforms = mapAttrs (name: value: let
@@ -111,7 +111,7 @@ in with pkgsUpstream.lib; with builtins; {
   inherit pkgs;
 
   channels = let
-    mkChannel = attrs: root.pkgs.vuizvui.mkChannel (rec {
+    mkChannel = attrs: root.pkgs.mkChannel (rec {
       name = "vuizvui-channel-${attrs.name or "generic"}-${vuizvuiVersion}";
       src = vuizvui;
       patchPhase = ''