@@ -0,0 +1,49 @@
1+{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
2+, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
3+, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xlibs, libcap, unzip
4+}:
5+let
6+ atomEnv = buildEnv {
7+ name = "env-atom";
8+ paths = [
9+ stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3
10+ fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
11+ xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
12+ xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr
13+ xlibs.libXcursor libcap
14+ ];
15+ };
16+in stdenv.mkDerivation rec {
17+ name = "atom-shell-${version}";
18+ version = "0.19.1";
19+
20+ src = fetchurl {
21+ url = "https://github.com/atom/atom-shell/releases/download/v0.19.1/atom-shell-v0.19.1-linux-x64.zip";
22+ sha256 = "10q1slwv2lkiqqxpv0m5a1k0gj2yp8bi9a7ilb05zz1wg7j3yw4y";
23+ name = "${name}.zip";
24+ };
25+
26+ buildInputs = [ atomEnv makeWrapper unzip ];
27+
28+ phases = [ "installPhase" "fixupPhase" ];
29+
30+ unpackCmd = "unzip";
31+
32+ installPhase = ''
33+ mkdir -p $out/bin
34+ unzip -d $out/bin $src
35+ patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
36+ $out/bin/atom
37+ mv $out/bin/atom $out/bin/atom-shell
38+ wrapProgram $out/bin/atom-shell \
39+ --prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64"
40+ '';
41+
42+ meta = with stdenv.lib; {
43+ description = "Cross platform desktop application shell";
44+ homepage = https://github.com/atom/atom-shell;
45+ license = [ licenses.mit ];
46+ maintainers = [ maintainers.fluffynukeit ];
47+ platforms = [ "x86_64-linux" ];
48+ };
49+}