2019-11-26 03:25:15 +00:00
|
|
|
{ wrapGAppsHook
|
|
|
|
, glib
|
|
|
|
, lib
|
2019-08-05 19:02:06 +01:00
|
|
|
, symlinkJoin
|
|
|
|
, switchboard
|
|
|
|
, switchboardPlugs
|
|
|
|
, plugs
|
2019-12-20 16:47:03 +00:00
|
|
|
# Only useful to disable for development testing.
|
|
|
|
, useDefaultPlugs ? true
|
2019-08-05 19:02:06 +01:00
|
|
|
}:
|
2018-08-20 21:31:18 +01:00
|
|
|
|
|
|
|
let
|
2019-12-20 16:47:03 +00:00
|
|
|
selectedPlugs =
|
|
|
|
if plugs == null then switchboardPlugs
|
2019-12-23 04:09:41 +00:00
|
|
|
else plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs);
|
2018-08-20 21:31:18 +01:00
|
|
|
in
|
|
|
|
symlinkJoin {
|
|
|
|
name = "${switchboard.name}-with-plugs";
|
|
|
|
|
2019-11-26 03:25:15 +00:00
|
|
|
paths = [
|
|
|
|
switchboard
|
|
|
|
] ++ selectedPlugs;
|
2018-08-20 21:31:18 +01:00
|
|
|
|
2019-11-26 03:25:15 +00:00
|
|
|
buildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
glib
|
|
|
|
] ++ (lib.forEach selectedPlugs (x: x.buildInputs))
|
|
|
|
++ selectedPlugs;
|
2018-08-20 21:31:18 +01:00
|
|
|
|
|
|
|
postBuild = ''
|
2019-11-26 03:25:15 +00:00
|
|
|
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;
|
|
|
|
}
|