Skip to content

Commit

Permalink
all-packages: Just refer to self, not super, or res
Browse files Browse the repository at this point in the history
This ends a years-long process to removoe pointless fixed points in this
file!
  • Loading branch information
Ericson2314 committed Feb 2, 2019
1 parent c85a8a1 commit 755e824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
20 changes: 3 additions & 17 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 @@ -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 755e824

Please sign in to comment.