diff options
author | John Ramsden <johnramsden@users.noreply.github.com> | 2017-05-07 16:05:53 -0700 |
---|---|---|
committer | John Ramsden <johnramsden@users.noreply.github.com> | 2017-05-07 16:05:53 -0700 |
commit | 42ff593555c9f74429441082a898b7d42bd5b287 (patch) | |
tree | 81edbcd54c04a3c66cb1436d182c10c7a48ae088 /pkgs/applications | |
parent | e7322f1fdfb499260541db8db6ae7f30c7039f9d (diff) | |
download | nixlib-42ff593555c9f74429441082a898b7d42bd5b287.tar nixlib-42ff593555c9f74429441082a898b7d42bd5b287.tar.gz nixlib-42ff593555c9f74429441082a898b7d42bd5b287.tar.bz2 nixlib-42ff593555c9f74429441082a898b7d42bd5b287.tar.lz nixlib-42ff593555c9f74429441082a898b7d42bd5b287.tar.xz nixlib-42ff593555c9f74429441082a898b7d42bd5b287.tar.zst nixlib-42ff593555c9f74429441082a898b7d42bd5b287.zip |
nylas-mail: 2.0.31
Added new email client Nylas-Mail.
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/networking/mailreaders/nylas-mail/default.nix | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix new file mode 100644 index 000000000000..6914dbdb7bf2 --- /dev/null +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -0,0 +1,134 @@ +{ config +, stdenv +, pkgs +, fetchurl +, dpkg +, lib +, gnome2 +, libgnome_keyring +, desktop_file_utils +, python2 +, nodejs +, libnotify +, alsaLib +, atk +, glib +, pango +, gdk_pixbuf +, cairo +, freetype +, fontconfig +, dbus +, nss +, nspr +, cups +, expat +, wget +, udev +, xorg +, libgcrypt +, makeWrapper +, gcc-unwrapped +, coreutils +}: + +stdenv.mkDerivation rec { + name = "${pkgname}-${version}"; + pkgname = "nylas-mail"; + version = "2.0.31"; + subVersion = "e675deb"; + + src = fetchurl { + url = "https://edgehill.s3-us-west-2.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb"; + sha256 = "b036956174f998bd4a2662a1f59cb4a302465b3ed06c487de88ff2721e372f6e"; + }; + + # Build dependencies + propagatedBuildInputs = [ + gnome2.gtk + gnome2.GConf + libgnome_keyring + desktop_file_utils + python2 + nodejs + libnotify + alsaLib + atk + glib + pango + gdk_pixbuf + cairo + freetype + fontconfig + dbus + nss + nspr + cups + expat + wget + udev + gcc-unwrapped + coreutils + xorg.libXScrnSaver + xorg.libXi + xorg.libXtst + xorg.libXcursor + xorg.libXdamage + xorg.libXrandr + xorg.libXcomposite + xorg.libXext + xorg.libXfixes + xorg.libXrender + xorg.libX11 + xorg.libxkbfile + ]; + + # Runtime dependencies + buildInputs = [ makeWrapper gnome2.gnome_keyring ]; + + phases = [ "unpackPhase" ]; + + unpackPhase = '' + mkdir -p $out + + ${dpkg}/bin/dpkg-deb -x $src unpacked + mv unpacked/usr/* $out/ + + # Fix path in desktop file + substituteInPlace $out/share/applications/nylas-mail.desktop \ + --replace /usr/bin/nylas-mail $out/bin/nylas-mail + + # Patch librariess + noderp=$(patchelf --print-rpath $out/share/nylas-mail/libnode.so) + patchelf --set-rpath $noderp:$out/lib:${stdenv.cc.cc.lib}/lib:${xorg.libxkbfile.out}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/libnode.so + + ffrp=$(patchelf --print-rpath $out/share/nylas-mail/libffmpeg.so) + patchelf --set-rpath $ffrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/libffmpeg.so + + # Patch binaries + binrp=$(patchelf --print-rpath $out/share/nylas-mail/nylas) + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath $binrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/nylas + + wrapProgram $out/share/nylas-mail/nylas --set LD_LIBRARY_PATH "${xorg.libxkbfile}/lib:${pkgs.gnome3.libgnome_keyring}/lib"; + + # Fix path to bash so apm can install plugins. + substituteInPlace $out/share/nylas-mail/resources/apm/bin/apm \ + --replace /bin/bash ${stdenv.shell} + + wrapProgram $out/share/nylas-mail/resources/apm/bin/apm \ + --set PATH "${coreutils}/bin" + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath ${gcc-unwrapped.lib}/lib \ + $out/share/nylas-mail/resources/apm/bin/node + ''; + + meta = { + description = "Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email."; + license = stdenv.lib.licenses.gpl3; + homepage = https://nylas.com; + }; +} |