about summary refs log tree commit diff
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2020-03-24 03:13:30 -0400
committerGitHub <noreply@github.com>2020-03-24 03:13:30 -0400
commit5a10c51acec7c5f188584da3e789a8a32ac5704e (patch)
treecccd2af1f50455e64c3fe7207224feaefb6476e7
parent83c0498f70066868fb2db2d839a48a30c58aceb8 (diff)
parenta9e7e9331152c7528155038c634201a5e1c5fc67 (diff)
downloadnixlib-5a10c51acec7c5f188584da3e789a8a32ac5704e.tar
nixlib-5a10c51acec7c5f188584da3e789a8a32ac5704e.tar.gz
nixlib-5a10c51acec7c5f188584da3e789a8a32ac5704e.tar.bz2
nixlib-5a10c51acec7c5f188584da3e789a8a32ac5704e.tar.lz
nixlib-5a10c51acec7c5f188584da3e789a8a32ac5704e.tar.xz
nixlib-5a10c51acec7c5f188584da3e789a8a32ac5704e.tar.zst
nixlib-5a10c51acec7c5f188584da3e789a8a32ac5704e.zip
Merge pull request #83265 from worldofpeace/fix-wingpanel-and-switchboard
Fix wingpanel and switchboard
-rw-r--r--pkgs/desktops/pantheon/apps/switchboard/wrapper.nix38
-rw-r--r--pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix35
2 files changed, 54 insertions, 19 deletions
diff --git a/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix b/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
index cc6b37095fdb..67f4105ff3d1 100644
--- a/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
+++ b/pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
@@ -1,7 +1,8 @@
 { wrapGAppsHook
 , glib
 , lib
-, symlinkJoin
+, stdenv
+, xorg
 , switchboard
 , switchboardPlugs
 , plugs
@@ -14,26 +15,45 @@ let
     if plugs == null then switchboardPlugs
     else plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs);
 in
-symlinkJoin {
+stdenv.mkDerivation rec {
   name = "${switchboard.name}-with-plugs";
 
+  src = null;
+
   paths = [
     switchboard
   ] ++ selectedPlugs;
 
-  buildInputs = [
-    wrapGAppsHook
+  passAsFile = [ "paths" ];
+
+  nativeBuildInputs = [
     glib
-  ] ++ (lib.forEach selectedPlugs (x: x.buildInputs))
+    wrapGAppsHook
+  ];
+
+  buildInputs = lib.forEach selectedPlugs (x: x.buildInputs)
     ++ selectedPlugs;
 
-  postBuild = ''
-    make_glib_find_gsettings_schemas
+  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
 
-    gappsWrapperArgs+=(--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard")
+  preferLocalBuild = true;
+  allowSubstitutes = false;
 
-    wrapGAppsHook
+  installPhase = ''
+    mkdir -p $out
+    for i in $(cat $pathsPath); do
+      ${xorg.lndir}/bin/lndir -silent $i $out
+    done
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard"
+    )
   '';
 
   inherit (switchboard) meta;
 }
+
diff --git a/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix b/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix
index 596ee816f891..ca887d45dc39 100644
--- a/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix
+++ b/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix
@@ -1,7 +1,8 @@
 { lib
 , wrapGAppsHook
 , glib
-, symlinkJoin
+, stdenv
+, xorg
 , wingpanel
 , wingpanelIndicators
 , switchboard-with-plugs
@@ -15,30 +16,44 @@ let
     if indicators == null then wingpanelIndicators
     else indicators ++ (lib.optionals useDefaultIndicators wingpanelIndicators);
 in
-symlinkJoin {
+stdenv.mkDerivation rec {
   name = "${wingpanel.name}-with-indicators";
 
+  src = null;
+
   paths = [
     wingpanel
   ] ++ selectedIndicators;
 
-  buildInputs = [
+  passAsFile = [ "paths" ];
+
+  nativeBuildInputs = [
     glib
     wrapGAppsHook
-  ] ++ (lib.forEach selectedIndicators (x: x.buildInputs))
+  ];
+
+  buildInputs = lib.forEach selectedIndicators (x: x.buildInputs)
     ++ selectedIndicators;
 
-  # We have to set SWITCHBOARD_PLUGS_PATH because wingpanel-applications-menu
-  # has a plugin to search switchboard settings
-  postBuild = ''
-    make_glib_find_gsettings_schemas
+  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
+
+  preferLocalBuild = true;
+  allowSubstitutes = false;
 
+  installPhase = ''
+    mkdir -p $out
+    for i in $(cat $pathsPath); do
+      ${xorg.lndir}/bin/lndir -silent $i $out
+    done
+  '';
+
+  preFixup = ''
     gappsWrapperArgs+=(
       --set WINGPANEL_INDICATORS_PATH "$out/lib/wingpanel"
       --set SWITCHBOARD_PLUGS_PATH "${switchboard-with-plugs}/lib/switchboard"
     )
-
-    wrapGAppsHook
   '';
 
   inherit (wingpanel) meta;