2014-11-13 05:39:58 +00:00
|
|
|
{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
|
|
|
|
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
|
|
|
|
, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xlibs, libcap, unzip
|
2015-06-19 22:17:00 +01:00
|
|
|
, systemd
|
2014-11-13 05:39:58 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
atomEnv = buildEnv {
|
|
|
|
name = "env-atom";
|
|
|
|
paths = [
|
2015-01-15 04:25:26 +00:00
|
|
|
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
|
2014-11-13 05:39:58 +00:00
|
|
|
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
|
|
|
|
xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
|
|
|
|
xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr
|
2015-06-19 22:17:00 +01:00
|
|
|
xlibs.libXcursor libcap systemd
|
2014-11-13 05:39:58 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2015-06-19 22:17:00 +01:00
|
|
|
name = "electron-${version}";
|
|
|
|
version = "0.28.2";
|
2014-11-13 05:39:58 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-06-19 22:17:00 +01:00
|
|
|
url = "https://github.com/atom/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip";
|
|
|
|
sha256 = "55b0880e2f78a60d95a58e83cd75006c34cb6ed90836e1f34e3359c3e5d0b8f0";
|
2014-11-13 05:39:58 +00:00
|
|
|
name = "${name}.zip";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ atomEnv makeWrapper unzip ];
|
|
|
|
|
|
|
|
phases = [ "installPhase" "fixupPhase" ];
|
|
|
|
|
|
|
|
unpackCmd = "unzip";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
unzip -d $out/bin $src
|
2014-12-17 18:11:30 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2015-06-19 22:17:00 +01:00
|
|
|
$out/bin/electron
|
|
|
|
wrapProgram $out/bin/electron \
|
2014-11-13 05:39:58 +00:00
|
|
|
--prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Cross platform desktop application shell";
|
2015-06-19 22:17:00 +01:00
|
|
|
homepage = https://github.com/atom/electron;
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.mit;
|
2015-06-20 19:43:10 +01:00
|
|
|
maintainers = [ maintainers.travisbhartwell ];
|
2014-11-13 05:39:58 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|