From 88652ce69a9ced055eb9998db484e9bb8a9acf30 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Fri, 24 Jan 2025 22:11:38 +0000 Subject: [PATCH] plugins/efmls: package option defaultText should not depend on pkgs The `defaultText` was conditional on default. Specifically, `default.meta.platforms`. This is not good, because it means the package must be evaluated in order to build the docs. --- plugins/by-name/efmls-configs/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/by-name/efmls-configs/default.nix b/plugins/by-name/efmls-configs/default.nix index 3fbf0e53..27af9943 100644 --- a/plugins/by-name/efmls-configs/default.nix +++ b/plugins/by-name/efmls-configs/default.nix @@ -44,10 +44,13 @@ in # Filter package defaults that are not compatible with the current platform (lib.attrsets.mapAttrs ( _: opt: - if lib.meta.availableOn pkgs.stdenv.hostPlatform opt.default then - opt - else - builtins.removeAttrs opt [ "defaultText" ] // { default = null; } + opt + // { + default = if lib.meta.availableOn pkgs.stdenv.hostPlatform opt.default then opt.default else null; + defaultText = lib.literalMD '' + `${opt.defaultText.text}` if available on the current system, otherwise null + ''; + } )) ];