From 32700e3eeed7d6e8ec5e4a53fe23203f0a7c4705 Mon Sep 17 00:00:00 2001 From: sterni Date: Mon, 3 Jan 2022 13:45:05 +0100 Subject: [PATCH] Use upstream nixpkgs' packages-config.nix (#405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- flake-info/src/commands/packages-config.nix | 47 +-------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/flake-info/src/commands/packages-config.nix b/flake-info/src/commands/packages-config.nix index 1642d6f..1a5a3ed 100644 --- a/flake-info/src/commands/packages-config.nix +++ b/flake-info/src/commands/packages-config.nix @@ -1,49 +1,4 @@ -{ - # Ensures no aliases are in the results. - allowAliases = false; - +import // { # 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" - ]; }