10 panelModulePackages ? [ ],
14 # We always want to find the built-in panel applets.
15 selectedPanelModulePackages = [
18 ] ++ panelModulePackages;
20 panelModulesEnv = buildEnv {
21 name = "gnome-panel-modules-env";
22 paths = selectedPanelModulePackages;
23 pathsToLink = [ "/lib/gnome-panel/modules" ];
27 pname = "${gnome-panel.pname}-with-modules";
28 inherit (gnome-panel) version;
36 selectedPanelModulePackages
37 ++ lib.forEach selectedPanelModulePackages (x: x.buildInputs or [ ]);
43 preferLocalBuild = true;
44 allowSubstitutes = false;
50 ${xorg.lndir}/bin/lndir -silent ${gnome-panel} $out
52 rm -r $out/lib/gnome-panel/modules
53 ${xorg.lndir}/bin/lndir -silent ${panelModulesEnv} $out
55 rm $out/share/applications/gnome-panel.desktop
57 substitute ${gnome-panel}/share/applications/gnome-panel.desktop \
58 $out/share/applications/gnome-panel.desktop --replace \
59 "Exec=${gnome-panel}/bin/gnome-panel" "Exec=$out/bin/gnome-panel"
66 --set NIX_GNOME_PANEL_MODULESDIR "$out/lib/gnome-panel/modules"
70 meta = gnome-panel.meta // {
71 outputsToInstall = [ "out" ];