diff options
Diffstat (limited to 'nixpkgs/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix')
-rw-r--r-- | nixpkgs/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix b/nixpkgs/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix new file mode 100644 index 000000000000..cfae604d3a53 --- /dev/null +++ b/nixpkgs/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix @@ -0,0 +1,23 @@ +{ 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; +} |