1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 19:26:02 +00:00
nixpkgs/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix

31 lines
866 B
Nix
Raw Normal View History

{ lib
, makeWrapper
, symlinkJoin
, wingpanel
, wingpanelIndicators
, switchboard-with-plugs
, indicators ? null
}:
2018-08-20 21:31:18 +01:00
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;
}