Allow self-references in top-level package list

It now allows for package to use our own packages easily.

Though, having a recursive attribute set can be easier, setting our
package list this way is easier to maintain in the long-term since it is
a set-and-forget setup. The only disadvantage I can see is the need to
re-review what the hell the code is doing depending on my familiarity
for Nix in the future. ;p
This commit is contained in:
Gabriel Arazas 2022-01-18 18:21:20 +08:00
parent 3148121bf6
commit 8b5fd926ec

View File

@ -1,27 +1,33 @@
{ pkgs ? import <nixpkgs> { } }: { pkgs ? import <nixpkgs> { }, overrides ? (self: super: { }) }:
with pkgs; { with pkgs;
doggo = callPackage ./doggo.nix { };
gnome-shell-extension-pop-shell = let
callPackage ./gnome-shell-extension-pop-shell.nix { }; packages = self:
gnome-shell-extension-burn-my-windows = let callPackage = newScope self;
callPackage ./gnome-shell-extension-burn-my-windows.nix { }; in {
gnome-shell-extension-desktop-cube = doggo = callPackage ./doggo.nix { };
callPackage ./gnome-shell-extension-desktop-cube.nix { }; gnome-shell-extension-burn-my-windows =
gnome-shell-extension-fly-pie = callPackage ./gnome-shell-extension-burn-my-windows.nix { };
callPackage ./gnome-shell-extension-fly-pie.nix { }; gnome-shell-extension-desktop-cube =
guile-config = callPackage ./guile-config.nix { }; callPackage ./gnome-shell-extension-desktop-cube.nix { };
guile-hall = callPackage ./guile-hall.nix { }; gnome-shell-extension-fly-pie =
junction = callPackage ./junction.nix { }; callPackage ./gnome-shell-extension-fly-pie.nix { };
libcs50 = callPackage ./libcs50.nix { }; gnome-shell-extension-pop-shell =
llama = callPackage ./llama.nix { }; callPackage ./gnome-shell-extension-pop-shell.nix { };
neo = callPackage ./neo.nix { }; guile-config = callPackage ./guile-config.nix { };
pop-launcher = callPackage ./pop-launcher.nix { }; guile-hall = callPackage ./guile-hall.nix { };
pop-launcher-plugin-duckduckgo-bangs = junction = callPackage ./junction.nix { };
callPackage ./pop-launcher-plugin-duckduckgo-bangs.nix { }; libcs50 = callPackage ./libcs50.nix { };
photon-rss = callPackage ./photon-rss.nix { }; llama = callPackage ./llama.nix { };
ratt = callPackage ./ratt.nix { }; neo = callPackage ./neo.nix { };
tic-80 = callPackage ./tic-80 { }; pop-launcher = callPackage ./pop-launcher.nix { };
sioyek = libsForQt5.callPackage ./sioyek.nix { }; pop-launcher-plugin-duckduckgo-bangs =
vpaint = libsForQt5.callPackage ./vpaint.nix { }; callPackage ./pop-launcher-plugin-duckduckgo-bangs.nix { };
} photon-rss = callPackage ./photon-rss.nix { };
ratt = callPackage ./ratt.nix { };
tic-80 = callPackage ./tic-80 { };
sioyek = libsForQt5.callPackage ./sioyek.nix { };
vpaint = libsForQt5.callPackage ./vpaint.nix { };
};
in lib.fix (lib.extends overrides packages)