3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
2019-01-24 20:54:14 +00:00

20 lines
457 B
Nix

{ stdenv, makeWrapper, symlinkJoin, switchboard, switchboardPlugs, plugs }:
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;
}