···1+pkgs: lib: self: super:
2+3+### Deprecated aliases - for backward compatibility
4+5+with self;
6+7+let
8+ # Removing recurseForDerivation prevents derivations of aliased attribute
9+ # set to appear while listing all the packages available.
10+ removeRecurseForDerivations = alias: with lib;
11+ if alias.recurseForDerivations or false
12+ then removeAttrs alias ["recurseForDerivations"]
13+ else alias;
14+15+ # Disabling distribution prevents top-level aliases for non-recursed package
16+ # sets from building on Hydra.
17+ removeDistribute = alias: with lib;
18+ if isDerivation alias then
19+ dontDistribute alias
20+ else alias;
21+22+ # Make sure that we are not shadowing something from node-packages.nix.
23+ checkInPkgs = n: alias:
24+ if builtins.hasAttr n super
25+ then throw "Alias ${n} is still in node-packages.nix"
26+ else alias;
27+28+ mapAliases = aliases:
29+ lib.mapAttrs (n: alias:
30+ removeDistribute
31+ (removeRecurseForDerivations
32+ (checkInPkgs n alias)))
33+ aliases;
34+in
35+36+mapAliases ({
37+ "@githubnext/github-copilot-cli" = pkgs.github-copilot-cli; # Added 2023-05-02
38+})