From 2a09a44a4494e54a03ce891e9c92cc6542f74227 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 12 Nov 2017 17:37:53 +0100 Subject: 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 --- modules/core/common.nix | 12 ++++-------- pkgs/default.nix | 2 +- release.nix | 4 ++-- 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 = '' -- cgit 1.4.1