about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
blob: 756ae86bb19d6b55abdae5e43a5b51619c6840c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ 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;
}