about summary refs log tree commit diff
path: root/pkgs/development/tools/electron/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/electron/generic.nix')
-rw-r--r--pkgs/development/tools/electron/generic.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/tools/electron/generic.nix b/pkgs/development/tools/electron/generic.nix
index d5d257ae6444..04b610dde1c5 100644
--- a/pkgs/development/tools/electron/generic.nix
+++ b/pkgs/development/tools/electron/generic.nix
@@ -1,4 +1,4 @@
-{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, glib, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core}:
+{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, glib, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core, libdrm, mesa }:
 
 version: hashes:
 let
@@ -33,6 +33,8 @@ let
     src = fetcher version (get tags platform) (get hashes platform);
   };
 
+  electronLibPath = stdenv.lib.makeLibraryPath ([ libuuid at-spi2-atk at-spi2-core ] ++ stdenv.lib.optionals (version > "9") [ libdrm mesa ]);
+
   linux = {
     buildInputs = [ glib gtk3 ];
 
@@ -56,7 +58,7 @@ let
     postFixup = ''
       patchelf \
         --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-        --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libuuid at-spi2-atk at-spi2-core ]}:$out/lib/electron" \
+        --set-rpath "${atomEnv.libPath}:${electronLibPath}:$out/lib/electron" \
         $out/lib/electron/electron
 
       wrapProgram $out/lib/electron/electron \