1
2lib: self: super:
3
4### Deprecated aliases - for backward compatibility
5###
6### !!! NOTE !!!
7### Use `./remove-attr.py [attrname]` in this directory to remove your alias
8### from the `luaPackages` set without regenerating the entire file.
9
10let
11 inherit (lib) dontDistribute hasAttr isDerivation mapAttrs;
12
13 # Removing recurseForDerivation prevents derivations of aliased attribute
14 # set to appear while listing all the packages available.
15 removeRecurseForDerivations = alias:
16 if alias.recurseForDerivations or false
17 then removeAttrs alias ["recurseForDerivations"]
18 else alias;
19
20 # Disabling distribution prevents top-level aliases for non-recursed package
21 # sets from building on Hydra.
22 removeDistribute = alias:
23 if isDerivation alias then
24 dontDistribute alias
25 else alias;
26
27 # Make sure that we are not shadowing something from node-packages.nix.
28 checkInPkgs = n: alias:
29 if hasAttr n super
30 then throw "Alias ${n} is still in generated.nix"
31 else alias;
32
33 mapAliases = aliases:
34 mapAttrs (n: alias:
35 removeDistribute
36 (removeRecurseForDerivations
37 (checkInPkgs n alias)))
38 aliases;
39in
40
41mapAliases {
42 lpty = throw "lpy was removed because broken and unmaintained "; # added 2023-10-14
43 cyrussasl = throw "cyrussasl was removed because broken and unmaintained "; # added 2023-10-18
44 nlua-nvim = throw "nlua-nvim was removed, use neodev-nvim instead"; # added 2023-12-16
45 nvim-client = throw "nvim-client was removed because it is now part of neovim"; # added 2023-12-17
46}