nixpkgs/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix

25 lines
453 B
Nix
Raw Normal View History

{ makeWrapper
, symlinkJoin
, switchboard
, switchboardPlugs
, plugs
}:
2018-08-20 13:31:18 -07:00
let
selectedPlugs = if plugs == null then switchboardPlugs else plugs;
in
symlinkJoin {
name = "${switchboard.name}-with-plugs";
paths = [ switchboard ] ++ selectedPlugs;
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/io.elementary.switchboard \
--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard"
'';
inherit (switchboard) meta;
}