pantheon.switchboard-with-plugs: fix wrapping

Since #81475 this caused the wrapper to be empty of entries from
wrapGAppsHook because the wrapGAppsHook function doesn't add
them anymore, and was moved to gappsWrapperArgsHook. Instead
of just running that in postBuild it's more future proof to make this
use stdenv.mkDerivation because we want to mess around with the
generic builder.
This commit is contained in:
worldofpeace 2020-03-24 03:11:55 -04:00
parent db41c787f4
commit a9e7e93311

View File

@ -1,7 +1,8 @@
{ wrapGAppsHook { wrapGAppsHook
, glib , glib
, lib , lib
, symlinkJoin , stdenv
, xorg
, switchboard , switchboard
, switchboardPlugs , switchboardPlugs
, plugs , plugs
@ -14,26 +15,45 @@ let
if plugs == null then switchboardPlugs if plugs == null then switchboardPlugs
else plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs); else plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs);
in in
symlinkJoin { stdenv.mkDerivation rec {
name = "${switchboard.name}-with-plugs"; name = "${switchboard.name}-with-plugs";
src = null;
paths = [ paths = [
switchboard switchboard
] ++ selectedPlugs; ] ++ selectedPlugs;
buildInputs = [ passAsFile = [ "paths" ];
wrapGAppsHook
nativeBuildInputs = [
glib glib
] ++ (lib.forEach selectedPlugs (x: x.buildInputs)) wrapGAppsHook
];
buildInputs = lib.forEach selectedPlugs (x: x.buildInputs)
++ selectedPlugs; ++ selectedPlugs;
postBuild = '' dontUnpack = true;
make_glib_find_gsettings_schemas dontConfigure = true;
dontBuild = true;
gappsWrapperArgs+=(--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard") preferLocalBuild = true;
allowSubstitutes = false;
wrapGAppsHook installPhase = ''
mkdir -p $out
for i in $(cat $pathsPath); do
${xorg.lndir}/bin/lndir -silent $i $out
done
'';
preFixup = ''
gappsWrapperArgs+=(
--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard"
)
''; '';
inherit (switchboard) meta; inherit (switchboard) meta;
} }