From 5d56bda1fba06293d9337117295cc03406af1aa9 Mon Sep 17 00:00:00 2001 From: Daniel Austin Date: Thu, 13 Nov 2014 06:39:58 +0100 Subject: [PATCH] Development tools: added atom-shell --- lib/maintainers.nix | 1 + pkgs/development/tools/atom-shell/default.nix | 49 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++ 3 files changed, 55 insertions(+) create mode 100644 pkgs/development/tools/atom-shell/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 99d4c3e1832b..fe58405eb10e 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -61,6 +61,7 @@ exlevan = "Alexey Levan "; falsifian = "James Cook "; flosse = "Markus Kohlhase "; + fluffynukeit = "Daniel Austin "; fpletz = "Franz Pletz "; ftrvxmtrx = "Siarhei Zirukin "; funfunctor = "Edward O'Callaghan "; diff --git a/pkgs/development/tools/atom-shell/default.nix b/pkgs/development/tools/atom-shell/default.nix new file mode 100644 index 000000000000..141ba284cc05 --- /dev/null +++ b/pkgs/development/tools/atom-shell/default.nix @@ -0,0 +1,49 @@ +{ 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 +}: +let + atomEnv = buildEnv { + name = "env-atom"; + paths = [ + stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 + 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 + xlibs.libXcursor libcap + ]; + }; +in stdenv.mkDerivation rec { + name = "atom-shell-${version}"; + version = "0.19.1"; + + src = fetchurl { + url = "https://github.com/atom/atom-shell/releases/download/v0.19.1/atom-shell-v0.19.1-linux-x64.zip"; + sha256 = "10q1slwv2lkiqqxpv0m5a1k0gj2yp8bi9a7ilb05zz1wg7j3yw4y"; + name = "${name}.zip"; + }; + + buildInputs = [ atomEnv makeWrapper unzip ]; + + phases = [ "installPhase" "fixupPhase" ]; + + unpackCmd = "unzip"; + + installPhase = '' + mkdir -p $out/bin + unzip -d $out/bin $src + patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + $out/bin/atom + mv $out/bin/atom $out/bin/atom-shell + wrapProgram $out/bin/atom-shell \ + --prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64" + ''; + + meta = with stdenv.lib; { + description = "Cross platform desktop application shell"; + homepage = https://github.com/atom/atom-shell; + license = [ licenses.mit ]; + maintainers = [ maintainers.fluffynukeit ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 29d66b1958d6..6d0284a6bad4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4306,6 +4306,11 @@ let astyle = callPackage ../development/tools/misc/astyle { }; + atom-shell = callPackage ../development/tools/atom-shell { + gconf = pkgs.gnome.GConf; + }; + + autobuild = callPackage ../development/tools/misc/autobuild { }; autoconf = callPackage ../development/tools/misc/autoconf { };