gitter: init at 4.1.0 (#43505)

authored by Ivan Malison and committed by xeji e090fb29 64e550c3

+73
+71
pkgs/applications/networking/instant-messengers/gitter/default.nix
··· 1 + { stdenv, alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl 2 + , fontconfig, freetype, gdk_pixbuf, glib, gnome3, gtk3, libX11 3 + , libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes 4 + , libXi, libXrandr, libXrender, libXtst, libappindicator-gtk3, libcxx 5 + , libnotify, libpulseaudio, libxcb, makeDesktopItem, makeWrapper, nspr, nss 6 + , nwjs, pango, systemd }: 7 + 8 + let gitterDirectorySuffix = "opt/gitter"; 9 + doELFPatch = target: '' 10 + patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \ 11 + --set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \ 12 + $out/${gitterDirectorySuffix}/${target} 13 + ''; 14 + libPath = stdenv.lib.makeLibraryPath [ 15 + alsaLib atk cairo cups dbus expat fontconfig freetype gdk_pixbuf glib 16 + gnome3.gconf gtk3 libX11 libXScrnSaver libXcomposite libXcursor libXdamage 17 + libXext libXfixes libXi libXrandr libXrender libXtst libappindicator-gtk3 18 + libcxx libnotify libpulseaudio libxcb nspr nss pango stdenv.cc.cc systemd 19 + ]; 20 + in stdenv.mkDerivation rec { 21 + pname = "gitter"; 22 + version = "4.1.0"; 23 + name = "${pname}-${version}"; 24 + 25 + src = fetchurl { 26 + url = "https://update.gitter.im/linux64/${pname}_${version}_amd64.deb"; 27 + sha256 = "1gny9i2pywvczzrs93k8krqn6hwm6c2zg8yr3xmjqs3p88817wbi"; 28 + }; 29 + 30 + nativeBuildInputs = [ makeWrapper dpkg ]; 31 + 32 + unpackPhase = "dpkg -x $src ."; 33 + 34 + installPhase = '' 35 + mkdir -p $out/{bin,opt/gitter,share/pixmaps} 36 + mv ./opt/Gitter/linux64/* $out/opt/gitter 37 + 38 + ${doELFPatch "Gitter"} 39 + ${doELFPatch "nacl_helper"} 40 + ${doELFPatch "minidump_stackwalk"} 41 + ${doELFPatch "nwjc"} 42 + ${doELFPatch "chromedriver"} 43 + ${doELFPatch "payload"} 44 + 45 + patchelf --set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \ 46 + $out/${gitterDirectorySuffix}/lib/libnw.so 47 + 48 + wrapProgram $out/${gitterDirectorySuffix}/Gitter --prefix LD_LIBRARY_PATH : ${libPath} 49 + 50 + ln -s $out/${gitterDirectorySuffix}/Gitter $out/bin/ 51 + ln -s $out/${gitterDirectorySuffix}/logo.png $out/share/pixmaps/gitter.png 52 + ln -s "${desktopItem}/share/applications" $out/share/ 53 + ''; 54 + 55 + desktopItem = makeDesktopItem { 56 + name = pname; 57 + exec = "Gitter"; 58 + icon = pname; 59 + desktopName = "Gitter"; 60 + genericName = meta.description; 61 + categories = "Network;InstantMessaging;"; 62 + }; 63 + 64 + meta = with stdenv.lib; { 65 + description = "Where developers come to talk"; 66 + downloadPage = "https://gitter.im/apps"; 67 + license = licenses.mit; 68 + maintainers = [ maintainers.imalison ]; 69 + platforms = [ "x86_64-linux" ]; 70 + }; 71 + }
+2
pkgs/top-level/all-packages.nix
··· 670 670 671 671 gitless = callPackage ../applications/version-management/gitless { }; 672 672 673 + gitter = callPackage ../applications/networking/instant-messengers/gitter { }; 674 + 673 675 grc = callPackage ../tools/misc/grc { }; 674 676 675 677 green-pdfviewer = callPackage ../applications/misc/green-pdfviewer {