96e711bcd1
Wingpanel was designed firstly as an indicator renderer, and as such just a container for indicators that are distributed outside itself. Being able to control which and each indicator with `indicators` is confusing, ideally each of the default indicators would be shipped with wingpanel itself. I don't see how this kind of extensibility would be useful to a user so we're going to append to the expected defaults. The `useDefaultIndicators` argument is there to development test a single indicator/s.
46 lines
1,021 B
Nix
46 lines
1,021 B
Nix
{ lib
|
|
, wrapGAppsHook
|
|
, glib
|
|
, symlinkJoin
|
|
, wingpanel
|
|
, wingpanelIndicators
|
|
, switchboard-with-plugs
|
|
, indicators ? null
|
|
# Only useful to disable for development testing.
|
|
, useDefaultIndicators ? true
|
|
}:
|
|
|
|
let
|
|
selectedIndicators =
|
|
if indicators == null then wingpanelIndicators
|
|
else indicators ++ (lib.optional useDefaultIndicators wingpanelIndicators);
|
|
in
|
|
symlinkJoin {
|
|
name = "${wingpanel.name}-with-indicators";
|
|
|
|
paths = [
|
|
wingpanel
|
|
] ++ selectedIndicators;
|
|
|
|
buildInputs = [
|
|
glib
|
|
wrapGAppsHook
|
|
] ++ (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
|
|
|
|
gappsWrapperArgs+=(
|
|
--set WINGPANEL_INDICATORS_PATH "$out/lib/wingpanel"
|
|
--set SWITCHBOARD_PLUGS_PATH "${switchboard-with-plugs}/lib/switchboard"
|
|
)
|
|
|
|
wrapGAppsHook
|
|
'';
|
|
|
|
inherit (wingpanel) meta;
|
|
}
|