Merge pull request #83265 from worldofpeace/fix-wingpanel-and-switchboard

Fix wingpanel and switchboard
This commit is contained in:
worldofpeace 2020-03-24 03:13:30 -04:00 committed by GitHub
commit 5a10c51ace
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 19 deletions

View File

@ -1,7 +1,8 @@
{ wrapGAppsHook
, glib
, lib
, symlinkJoin
, stdenv
, xorg
, switchboard
, switchboardPlugs
, plugs
@ -14,26 +15,45 @@ let
if plugs == null then switchboardPlugs
else plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs);
in
symlinkJoin {
stdenv.mkDerivation rec {
name = "${switchboard.name}-with-plugs";
src = null;
paths = [
switchboard
] ++ selectedPlugs;
buildInputs = [
wrapGAppsHook
passAsFile = [ "paths" ];
nativeBuildInputs = [
glib
] ++ (lib.forEach selectedPlugs (x: x.buildInputs))
wrapGAppsHook
];
buildInputs = lib.forEach selectedPlugs (x: x.buildInputs)
++ selectedPlugs;
postBuild = ''
make_glib_find_gsettings_schemas
dontUnpack = true;
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;
}

View File

@ -1,7 +1,8 @@
{ lib
, wrapGAppsHook
, glib
, symlinkJoin
, stdenv
, xorg
, wingpanel
, wingpanelIndicators
, switchboard-with-plugs
@ -15,30 +16,44 @@ let
if indicators == null then wingpanelIndicators
else indicators ++ (lib.optionals useDefaultIndicators wingpanelIndicators);
in
symlinkJoin {
stdenv.mkDerivation rec {
name = "${wingpanel.name}-with-indicators";
src = null;
paths = [
wingpanel
] ++ selectedIndicators;
buildInputs = [
passAsFile = [ "paths" ];
nativeBuildInputs = [
glib
wrapGAppsHook
] ++ (lib.forEach selectedIndicators (x: x.buildInputs))
];
buildInputs = lib.forEach selectedIndicators (x: x.buildInputs)
++ selectedIndicators;
# We have to set SWITCHBOARD_PLUGS_PATH because wingpanel-applications-menu
# has a plugin to search switchboard settings
postBuild = ''
make_glib_find_gsettings_schemas
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
preferLocalBuild = true;
allowSubstitutes = false;
installPhase = ''
mkdir -p $out
for i in $(cat $pathsPath); do
${xorg.lndir}/bin/lndir -silent $i $out
done
'';
preFixup = ''
gappsWrapperArgs+=(
--set WINGPANEL_INDICATORS_PATH "$out/lib/wingpanel"
--set SWITCHBOARD_PLUGS_PATH "${switchboard-with-plugs}/lib/switchboard"
)
wrapGAppsHook
'';
inherit (wingpanel) meta;