···11+pkgs: lib: self: super:
22+33+### Deprecated aliases - for backward compatibility
44+55+with self;
66+77+let
88+ # Removing recurseForDerivation prevents derivations of aliased attribute
99+ # set to appear while listing all the packages available.
1010+ removeRecurseForDerivations = alias: with lib;
1111+ if alias.recurseForDerivations or false
1212+ then removeAttrs alias ["recurseForDerivations"]
1313+ else alias;
1414+1515+ # Disabling distribution prevents top-level aliases for non-recursed package
1616+ # sets from building on Hydra.
1717+ removeDistribute = alias: with lib;
1818+ if isDerivation alias then
1919+ dontDistribute alias
2020+ else alias;
2121+2222+ # Make sure that we are not shadowing something from node-packages.nix.
2323+ checkInPkgs = n: alias:
2424+ if builtins.hasAttr n super
2525+ then throw "Alias ${n} is still in node-packages.nix"
2626+ else alias;
2727+2828+ mapAliases = aliases:
2929+ lib.mapAttrs (n: alias:
3030+ removeDistribute
3131+ (removeRecurseForDerivations
3232+ (checkInPkgs n alias)))
3333+ aliases;
3434+in
3535+3636+mapAliases ({
3737+ "@githubnext/github-copilot-cli" = pkgs.github-copilot-cli; # Added 2023-05-02
3838+})