From d254845ca8f6b1f9b225a60e7b54255e4a78031f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 20 Aug 2022 17:11:22 +0200 Subject: [PATCH] legacyPackages: anything -> raw The `anything` type is too strict, because it uses `attrsOf` internally, filtering out `mkIf` attrs and therefore evaluating attribute values when only the names would be needed. Furthermore, it is not safe to make assumptions about the objects in legacyPackages, because while most attributes contain packages or package sets, anything is allowed, so we don't know for sure how to merge. Fixes #52 --- modules/legacyPackages.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/legacyPackages.nix b/modules/legacyPackages.nix index 197d147..6cd4da3 100644 --- a/modules/legacyPackages.nix +++ b/modules/legacyPackages.nix @@ -16,10 +16,10 @@ in options = { flake = mkSubmoduleOptions { legacyPackages = mkOption { - type = types.lazyAttrsOf (types.lazyAttrsOf types.anything); + type = types.lazyAttrsOf (types.lazyAttrsOf types.raw); default = { }; description = '' - Per system, an attribute set of anything. This is also used by nix build .#<attrpath>. + Per system, an attribute set of unmergeable values. This is also used by nix build .#<attrpath>. ''; }; }; @@ -27,10 +27,10 @@ in perSystem = mkPerSystemOption ({ config, ... }: { options = { legacyPackages = mkOption { - type = types.lazyAttrsOf types.anything; + type = types.lazyAttrsOf types.raw; default = { }; description = '' - An attribute set of anything. This is also used by nix build .#<attrpath>. + An attribute set of unmergeable values. This is also used by nix build .#<attrpath>. ''; }; };