summaryrefslogtreecommitdiffstats
path: root/pkgs/development/tools/electron
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-04-22 13:51:11 +0300
committerJakob Gillich <jakob@gillich.me>2016-04-22 16:10:51 +0200
commit6185f74531b1610fb0e71a4f057e6dbeeb116616 (patch)
tree9708aa849f360e1f8bdf82d92ec8ec019e5fcc24 /pkgs/development/tools/electron
parentb2426adf1cd3a21ab321c98e0753334a897436a7 (diff)
atom, electron, vscode: split dependencies to atomEnv
fixes #14890
Diffstat (limited to 'pkgs/development/tools/electron')
-rw-r--r--pkgs/development/tools/electron/default.nix30
-rw-r--r--pkgs/development/tools/electron/env-atom.nix17
2 files changed, 10 insertions, 37 deletions
diff --git a/pkgs/development/tools/electron/default.nix b/pkgs/development/tools/electron/default.nix
index d7d338f7f60e..74adbb3f153d 100644
--- a/pkgs/development/tools/electron/default.nix
+++ b/pkgs/development/tools/electron/default.nix
@@ -1,10 +1,6 @@
-{ stdenv, callPackage, fetchurl, unzip
-, ...
-} @ args:
+{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv }:
-let
- atomEnv = callPackage ./env-atom.nix (args);
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
name = "electron-${version}";
version = "0.36.2";
@@ -14,23 +10,17 @@ in stdenv.mkDerivation rec {
name = "${name}.zip";
};
- buildInputs = [ atomEnv unzip ];
+ buildInputs = [ unzip ];
- phases = [ "installPhase" "fixupPhase" ];
+ buildCommand = ''
+ mkdir -p $out/lib/electron $out/bin
+ unzip -d $out/lib/electron $src
+ ln -s $out/lib/electron/electron $out/bin
- unpackCmd = "unzip";
-
- installPhase = ''
- mkdir -p $out/bin
- unzip -d $out/bin $src
- patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
- $out/bin/electron
- '';
-
- postFixup = ''
patchelf \
- --set-rpath "${atomEnv}/lib:${atomEnv}/lib64:$out/bin:$(patchelf --print-rpath $out/bin/electron)" \
- $out/bin/electron
+ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+ --set-rpath "${atomEnv.libPath}:$out/lib/electron" \
+ $out/lib/electron/electron
'';
meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/electron/env-atom.nix b/pkgs/development/tools/electron/env-atom.nix
deleted file mode 100644
index 6c69b2e52ccb..000000000000
--- a/pkgs/development/tools/electron/env-atom.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ stdenv, buildEnv, zlib, glib, alsaLib
-, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
-, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap
-, systemd, libnotify
-, ...
-}:
-
-buildEnv {
- name = "env-atom";
- paths = [
- stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
- fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
- xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
- xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
- xorg.libXcursor libcap systemd libnotify
- ];
-}