Skip to content

Commit

Permalink
Merge pull request #55097 from Ericson2314/remove-res
Browse files Browse the repository at this point in the history
all-packages: Just refer to `self`, not `super`, or `res`
  • Loading branch information
Ericson2314 committed Feb 2, 2019
2 parents a9bf045 + 755e824 commit e375f6d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
14 changes: 7 additions & 7 deletions pkgs/servers/sql/postgresql/default.nix
Expand Up @@ -153,46 +153,46 @@ let
'';
};

in self: super: {
in self: {

postgresql_9_4 = super.callPackage generic {
postgresql_9_4 = self.callPackage generic {
version = "9.4.20";
psqlSchema = "9.4";
sha256 = "0zzqjz5jrn624hzh04drpj6axh30a9k6bgawid6rwk45nbfxicgf";
this = self.postgresql_9_4;
inherit self;
};

postgresql_9_5 = super.callPackage generic {
postgresql_9_5 = self.callPackage generic {
version = "9.5.15";
psqlSchema = "9.5";
sha256 = "0i2lylgmsmy2g1ixlvl112fryp7jmrd0i2brk8sxb7vzzpg3znnv";
this = self.postgresql_9_5;
inherit self;
};

postgresql_9_6 = super.callPackage generic {
postgresql_9_6 = self.callPackage generic {
version = "9.6.11";
psqlSchema = "9.6";
sha256 = "0c55akrkzqd6p6a8hr0338wk246hl76r9j16p4zn3s51d7f0l99q";
this = self.postgresql_9_6;
inherit self;
};

postgresql_10 = super.callPackage generic {
postgresql_10 = self.callPackage generic {
version = "10.6";
psqlSchema = "10.0";
sha256 = "0jv26y3f10svrjxzsgqxg956c86b664azyk2wppzpa5x11pjga38";
this = self.postgresql_10;
inherit self;
};

postgresql_11 = super.callPackage generic {
postgresql_11 = self.callPackage generic {
version = "11.1";
psqlSchema = "11.1";
sha256 = "026v0sicsh7avzi45waf8shcbhivyxmi7qgn9fd1x0vl520mx0ch";
this = self.postgresql_11;
inherit self;
};

}
}
22 changes: 4 additions & 18 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -6,25 +6,11 @@
* Hint: ### starts category names.
*/
{ lib, noSysDirs, config}:
res: pkgs: super:
pkgs:

with pkgs;

let
self =
builtins.trace ''
It seems that you are using a patched Nixpkgs that references the self
variable in pkgs/top-level/all-packages.nix. This variable was incorrectly
named, so its usage needs attention. Please use pkgs for packages or super
for functions.
''
res; # Do *NOT* use res in your fork. It will be removed.

# TODO: turn self into an error

in
{

# Allow callPackage to fill in the pkgs argument
inherit pkgs;

Expand Down Expand Up @@ -13872,7 +13858,7 @@ in

timescaledb-parallel-copy = callPackage ../development/tools/database/timescaledb-parallel-copy { };

inherit (import ../servers/sql/postgresql pkgs super)
inherit (import ../servers/sql/postgresql pkgs)
postgresql_9_4
postgresql_9_5
postgresql_9_6
Expand Down Expand Up @@ -16218,7 +16204,7 @@ in
};
bitwig-studio2 = callPackage ../applications/audio/bitwig-studio/bitwig-studio2.nix {
inherit (gnome3) zenity;
inherit (res) bitwig-studio1;
inherit (pkgs) bitwig-studio1;
};
bitwig-studio = bitwig-studio2;

Expand Down Expand Up @@ -22528,7 +22514,7 @@ in
parameter set to the right value for your deployment target.
*/
nixos = configuration:
(import (res.path + "/nixos/lib/eval-config.nix") {
(import (pkgs.path + "/nixos/lib/eval-config.nix") {
inherit (pkgs.stdenv.hostPlatform) system;
modules = [(
{ lib, ... }: {
Expand Down
5 changes: 1 addition & 4 deletions pkgs/top-level/stage.nix
Expand Up @@ -89,10 +89,7 @@ let
splice = self: super: import ./splice.nix lib self (buildPackages != null);

allPackages = self: super:
let res = import ./all-packages.nix
{ inherit lib noSysDirs config; }
res self super;
in res;
import ./all-packages.nix { inherit lib noSysDirs config; } self;

aliases = self: super: lib.optionalAttrs (config.allowAliases or true) (import ./aliases.nix lib self super);

Expand Down

0 comments on commit e375f6d

Please sign in to comment.