diff options
author | Atemu <atemu.main@gmail.com> | 2021-02-19 19:21:56 +0100 |
---|---|---|
committer | Atemu <atemu.main@gmail.com> | 2021-07-17 05:49:29 +0200 |
commit | 9d8ac38621598edd2c48780fae77f5dc1e4084c4 (patch) | |
tree | d8be78ddf97dc4bc8340f9b6f0dde6371ca03c63 /pkgs/top-level/packages-config.nix | |
parent | 301e023293ff1ece7005a26c0b39409e1e13baa2 (diff) |
packages-config: refactor and simplification
Now simply inherits attrsets from super directly instead of mapping getAttr over a list of strings. Filtering isn't really needed as non-existent subsets should just be removed from this list when removing them from Nixpkgs (such an action warrants a tree-wide search which should come across this file). recurseIntoAttrs can simply be mapAttr'd now. Some subsets have been removed because they no longer exist. Sorted the list while I was at it.
Diffstat (limited to 'pkgs/top-level/packages-config.nix')
-rw-r--r-- | pkgs/top-level/packages-config.nix | 61 |
1 files changed, 28 insertions, 33 deletions
diff --git a/pkgs/top-level/packages-config.nix b/pkgs/top-level/packages-config.nix index 84db6fa21ee65..d7dfbf5860bb5 100644 --- a/pkgs/top-level/packages-config.nix +++ b/pkgs/top-level/packages-config.nix @@ -6,37 +6,32 @@ # Enable recursion into attribute sets that nix-env normally doesn't look into # so that we can get a more complete picture of the available packages for the # purposes of the index. - packageOverrides = super: - let - recurseIntoAttrs = sets: - super.lib.genAttrs - (builtins.filter (set: builtins.hasAttr set super) sets) - (set: super.recurseIntoAttrs (builtins.getAttr set super)); - in recurseIntoAttrs [ - "roundcubePlugins" - "emscriptenfastcompPackages" - "fdbPackages" - "nodePackages_latest" - "nodePackages" - "platformioPackages" - "haskellPackages" - "idrisPackages" - "sconsPackages" - "gns3Packages" - "quicklispPackagesClisp" - "quicklispPackagesSBCL" - "rPackages" - "apacheHttpdPackages_2_4" - "zabbix50" - "zabbix40" - "zabbix30" - "fusePackages" - "nvidiaPackages" - "sourceHanPackages" - "atomPackages" - "emacs27.pkgs" - "steamPackages" - "ut2004Packages" - "zeroadPackages" - ]; + packageOverrides = super: with super; lib.mapAttrs (_: set: recurseIntoAttrs set) { + inherit (super) + apacheHttpdPackages + atomPackages + fdbPackages + fusePackages + gns3Packages + haskellPackages + idrisPackages + nodePackages + nodePackages_latest + platformioPackages + quicklispPackagesClisp + quicklispPackagesSBCL + rPackages + roundcubePlugins + sconsPackages + sourceHanPackages + steamPackages + ut2004Packages + zabbix40 + zabbix50 + zeroadPackages + ; + + # This is an alias which we disallow by default; explicitly allow it + emacs27Packages = emacs27.pkgs; + }; } |