3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix

40 lines
721 B
Nix
Raw Normal View History

{ wrapGAppsHook
, glib
, lib
, symlinkJoin
, switchboard
, switchboardPlugs
, plugs
# Only useful to disable for development testing.
, useDefaultPlugs ? true
}:
2018-08-20 21:31:18 +01:00
let
selectedPlugs =
if plugs == null then switchboardPlugs
else plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs);
2018-08-20 21:31:18 +01:00
in
symlinkJoin {
name = "${switchboard.name}-with-plugs";
paths = [
switchboard
] ++ selectedPlugs;
2018-08-20 21:31:18 +01:00
buildInputs = [
wrapGAppsHook
glib
] ++ (lib.forEach selectedPlugs (x: x.buildInputs))
++ selectedPlugs;
2018-08-20 21:31:18 +01:00
postBuild = ''
make_glib_find_gsettings_schemas
gappsWrapperArgs+=(--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard")
wrapGAppsHook
2018-08-20 21:31:18 +01:00
'';
inherit (switchboard) meta;
}