summary refs log tree commit diff
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2020-03-24 01:21:43 -0400
committerworldofpeace <worldofpeace@protonmail.ch>2020-03-24 03:13:01 -0400
commitdb41c787f4ad85a29b291c544a843c829f123131 (patch)
treea415699bfc80311e30f33eb566c07fe23f7aa681
parentd96bd3394b734487d1c3bfbac0e8f17465e03afe (diff)
downloadnixpkgs-db41c787f4ad85a29b291c544a843c829f123131.tar
nixpkgs-db41c787f4ad85a29b291c544a843c829f123131.tar.gz
nixpkgs-db41c787f4ad85a29b291c544a843c829f123131.tar.bz2
nixpkgs-db41c787f4ad85a29b291c544a843c829f123131.tar.lz
nixpkgs-db41c787f4ad85a29b291c544a843c829f123131.tar.xz
nixpkgs-db41c787f4ad85a29b291c544a843c829f123131.tar.zst
nixpkgs-db41c787f4ad85a29b291c544a843c829f123131.zip
pantheon.wingpanel-with-indicators: fix wrapping
Since #81475 this caused the wrapper to be empty of entries from
wrapGAppsHook because the wrapGAppsHook function doesn't add
them anymore, and was moved to gappsWrapperArgsHook. Instead
of just running that in postBuild it's more future proof to make this
use stdenv.mkDerivation because we want to mess around with the
generic builder.
-rw-r--r--pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix35
1 files changed, 25 insertions, 10 deletions
diff --git a/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix b/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix
index 596ee816f89..ca887d45dc3 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;