nixpkgs/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix
worldofpeace 0b59f4212c pantheon: stylize expressions
The same way we want them in GNOME in nixpkgs.
Didn't touch the greeter expression because I have
a branch where it's already rewritten.
2019-08-06 11:20:01 -04:00

30 lines
866 B
Nix

{ lib
, makeWrapper
, symlinkJoin
, wingpanel
, wingpanelIndicators
, switchboard-with-plugs
, indicators ? null
}:
let
selectedIndicators = if indicators == null then wingpanelIndicators else indicators;
in
symlinkJoin {
name = "${wingpanel.name}-with-indicators";
paths = [ wingpanel ] ++ selectedIndicators;
buildInputs = [ makeWrapper ];
# We have to set SWITCHBOARD_PLUGS_PATH because wingpanel-applications-menu
# has a plugin to search switchboard settings
postBuild = ''
wrapProgram $out/bin/wingpanel \
--set WINGPANEL_INDICATORS_PATH "$out/lib/wingpanel" \
--set SWITCHBOARD_PLUGS_PATH "${switchboard-with-plugs}/lib/switchboard" \
--suffix XDG_DATA_DIRS : ${lib.concatMapStringsSep ":" (indicator: ''${indicator}/share/gsettings-schemas/${indicator.name}'') selectedIndicators}
'';
inherit (wingpanel) meta;
}