Use upstream nixpkgs' packages-config.nix (#405)

The files in nixos-search and nixpkgs have already unnecessarily
diverged — more than they should given that the only difference is that
the search ignores unfree packages (while nixpkgs includes them for the
benefit of repology).

Since we update the NIX_PATH when calling nix-env in nixpkgs_info.rs, we
can simply import the packages-config.nix from nixpkgs using that
information and update it with our addition `allowUnfree = false`.

Fixes #337.
This commit is contained in:
sterni 2022-01-03 13:45:05 +01:00 committed by GitHub
parent 078c68764b
commit 32700e3eee
Failed to generate hash of commit

View file

@ -1,49 +1,4 @@
{
# Ensures no aliases are in the results.
allowAliases = false;
import <nixpkgs/pkgs/top-level/packages-config.nix> // {
# Do *NOT* list unfree packages
allowUnfree = false;
# 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"
"haskell.compiler"
"idrisPackages"
"sconsPackages"
"gns3Packages"
"quicklispPackagesClisp"
"quicklispPackagesSBCL"
"rPackages"
"apacheHttpdPackages_2_4"
"zabbix44"
"zabbix40"
"zabbix30"
"fusePackages"
"nvidiaPackages"
"sourceHanPackages"
"atomPackages"
"emacs25Packages"
"emacs26Packages"
"emacs25.pkgs"
"emacs26.pkgs"
"emacs27.pkgs"
"steamPackages"
"ut2004Packages"
"zeroadPackages"
];
}