From 8651fc7a4d9f84aa84d1bc2d3a693e027b661d6c Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 10 Aug 2022 12:43:33 +0800 Subject: [PATCH] programs/pop-launcher: make plugin packages not rewrite symlinks --- modules/nixos/programs/pop-launcher.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/nixos/programs/pop-launcher.nix b/modules/nixos/programs/pop-launcher.nix index 62fd038a..b96bcfbc 100644 --- a/modules/nixos/programs/pop-launcher.nix +++ b/modules/nixos/programs/pop-launcher.nix @@ -12,11 +12,17 @@ let dontRewriteSymlinks = true; }); + # Some plugins may be packaged busybox-style with multiple plugins in one + # binary. + plugins = lib.lists.map (p: p.overrideAttrs (prev: { + dontRewriteSymlinks = true; + })) cfg.plugins; + # Plugins and scripts are assumed to be packaged at # `$out/share/pop-launcher`. pluginsDir = pkgs.symlinkJoin { name = "pop-launcher-plugins-system"; - paths = builtins.map (p: "${p}/share/pop-launcher") (cfg.plugins ++ [ package ]); + paths = builtins.map (p: "${p}/share/pop-launcher") (plugins ++ [ package ]); }; in { @@ -64,9 +70,7 @@ in }; config = lib.mkIf cfg.enable { - environment.etc.pop-launcher = lib.mkIf (cfg.plugins != []) { - source = pluginsDir; - }; + environment.etc.pop-launcher.source = pluginsDir; environment.systemPackages = with pkgs; [ pop-launcher