about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/electron/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/electron/generic.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/electron/generic.nix30
1 files changed, 28 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/tools/electron/generic.nix b/nixpkgs/pkgs/development/tools/electron/generic.nix
index f24358676dd7..6d0dbc8cace2 100644
--- a/nixpkgs/pkgs/development/tools/electron/generic.nix
+++ b/nixpkgs/pkgs/development/tools/electron/generic.nix
@@ -1,4 +1,20 @@
-{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, glib, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core, libdrm, mesa }:
+{ stdenv
+, libXScrnSaver
+, makeWrapper
+, fetchurl
+, wrapGAppsHook
+, glib
+, gtk3
+, unzip
+, atomEnv
+, libuuid
+, at-spi2-atk
+, at-spi2-core
+, libdrm
+, mesa
+, libxkbcommon
+, libappindicator-gtk3
+}:
 
 version: hashes:
 let
@@ -18,6 +34,11 @@ let
     sha256 = hash;
   };
 
+  headersFetcher = vers: hash: fetchurl {
+    url = "https://atom.io/download/electron/v${vers}/node-v${vers}-headers.tar.gz";
+    sha256 = hash;
+  };
+
   tags = {
     i686-linux = "linux-ia32";
     x86_64-linux = "linux-x64";
@@ -32,9 +53,14 @@ let
   common = platform: {
     inherit name version meta;
     src = fetcher version (get tags platform) (get hashes platform);
+    passthru.headers = headersFetcher version hashes.headers;
   };
 
-  electronLibPath = with stdenv.lib; makeLibraryPath ([ libuuid at-spi2-atk at-spi2-core ] ++ optionals (! versionOlder version "9.0.0") [ libdrm mesa ]);
+  electronLibPath = with stdenv.lib; makeLibraryPath (
+    [ libuuid at-spi2-atk at-spi2-core libappindicator-gtk3 ]
+    ++ optionals (! versionOlder version "9.0.0") [ libdrm mesa ]
+    ++ optionals (! versionOlder version "11.0.0") [ libxkbcommon ]
+  );
 
   linux = {
     buildInputs = [ glib gtk3 ];