about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-06 15:14:57 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-06 15:14:57 +0200
commit942422a646723972326540bbb2bb7c6218a14246 (patch)
tree738f514a3b1ce1ccc79635270d09b904bd69464c /pkgs/applications
parent7004641566c6c1e11464cec360613341e44cb320 (diff)
parent8fcc92fc692b4ec7511530068cf0ab1e5d757082 (diff)
downloadnixlib-942422a646723972326540bbb2bb7c6218a14246.tar
nixlib-942422a646723972326540bbb2bb7c6218a14246.tar.gz
nixlib-942422a646723972326540bbb2bb7c6218a14246.tar.bz2
nixlib-942422a646723972326540bbb2bb7c6218a14246.tar.lz
nixlib-942422a646723972326540bbb2bb7c6218a14246.tar.xz
nixlib-942422a646723972326540bbb2bb7c6218a14246.tar.zst
nixlib-942422a646723972326540bbb2bb7c6218a14246.zip
Merge branch 'glibc' of https://github.com/rnhmjoj/nixpkgs into staging
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/altcoins/default.nix6
-rw-r--r--pkgs/applications/altcoins/zcash/default.nix49
-rw-r--r--pkgs/applications/altcoins/zcash/librustzcash/default.nix30
-rw-r--r--pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix29
-rw-r--r--pkgs/applications/altcoins/zcash/libsnark/default.nix45
-rw-r--r--pkgs/applications/altcoins/zcash/libsnark/mie.nix27
-rw-r--r--pkgs/applications/altcoins/zcash/libsnark/xbyak.nix28
-rw-r--r--pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix136
8 files changed, 350 insertions, 0 deletions
diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix
index 1fcfd5f2b60c..22da4ed50b42 100644
--- a/pkgs/applications/altcoins/default.nix
+++ b/pkgs/applications/altcoins/default.nix
@@ -43,4 +43,10 @@ rec {
   primecoind = callPackage ./primecoin.nix { withGui = false; };
 
   stellar-core = callPackage ./stellar-core.nix { };
+
+  zcash = callPackage ./zcash {
+    withGui = false;
+    openssl = pkgs.openssl_1_1_0;
+    boost = pkgs.boost163;
+  };
 }
diff --git a/pkgs/applications/altcoins/zcash/default.nix b/pkgs/applications/altcoins/zcash/default.nix
new file mode 100644
index 000000000000..0146bad6f86f
--- /dev/null
+++ b/pkgs/applications/altcoins/zcash/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
+, zlib, gtest, gmock, miniupnpc, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
+, withGui }:
+
+let libsnark     = callPackage ./libsnark { inherit boost openssl; };
+    librustzcash = callPackage ./librustzcash {};
+in
+with stdenv.lib;
+stdenv.mkDerivation rec{
+
+  name = "zcash" + (toString (optional (!withGui) "d")) + "-" + version;
+  version = "1.0.8";
+
+  src = fetchFromGitHub {
+    owner = "zcash";
+    repo  = "zcash";
+    rev = "f630519d865ce22a6cf72a29785f2a876902f8e1";
+    sha256 = "1zjxg3dp0amjfs67469yp9b223v9hx29lkxid9wz2ivxj3paq7bv";
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs = [ pkgconfig gtest gmock gmp libsnark autoreconfHook openssl wget db62 boost zlib
+                  miniupnpc protobuf libevent libsodium librustzcash ]
+                  ++ optionals stdenv.isLinux [ utillinux ]
+                  ++ optionals withGui [ qt4 qrencode ];
+
+  configureFlags = [ "LIBSNARK_INCDIR=${libsnark}/include/libsnark"
+                     "--with-boost-libdir=${boost.out}/lib"
+                   ] ++ optionals withGui [ "--with-gui=qt4" ];
+
+  patchPhase = ''
+    sed -i"" '/^\[LIBSNARK_INCDIR/d'               configure.ac
+    sed -i"" 's,-lboost_system-mt,-lboost_system,' configure.ac
+    sed -i"" 's,-fvisibility=hidden,,g'            src/Makefile.am
+  '';
+
+  postInstall = ''
+    cp zcutil/fetch-params.sh $out/bin/zcash-fetch-params
+  '';
+
+  meta = {
+    description = "Peer-to-peer, anonymous electronic cash system";
+    homepage = "https://z.cash/";
+    maintainers = with maintainers; [ rht ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/altcoins/zcash/librustzcash/default.nix b/pkgs/applications/altcoins/zcash/librustzcash/default.nix
new file mode 100644
index 000000000000..4ce9a279d919
--- /dev/null
+++ b/pkgs/applications/altcoins/zcash/librustzcash/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  name = "librustzcash-unstable-${version}";
+  version = "2017-03-17";
+
+  src = fetchFromGitHub {
+    owner = "zcash";
+    repo = "librustzcash";
+    rev = "91348647a86201a9482ad4ad68398152dc3d635e";
+    sha256 = "02l1f46frpvw1r6k1wfh77mrsnmsdvifqx0vnscxz4xgb9ia9d1c";
+  };
+
+  depsSha256 = "02qx8zdhmj7rmhqqq5q9428x9mlrjxxcnn4yhnygz9gfgvada2hx";
+
+  installPhase = ''
+    mkdir -p $out/lib
+    cp target/release/librustzcash.a $out/lib/
+    mkdir -p $out/include
+    cp include/librustzcash.h $out/include/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Rust-language assets for Zcash";
+    homepage = "https://github.com/zcash/librustzcash";
+    maintainers = with maintainers; [ rht ];
+    license = with licenses; [ mit asl20 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix b/pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix
new file mode 100644
index 000000000000..c5a824cd17d3
--- /dev/null
+++ b/pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix
@@ -0,0 +1,29 @@
+{ stdenv, xbyak, gmp, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "ate-pairing-unstable-${version}";
+  version = "2016-05-03";
+
+  src = fetchFromGitHub {
+    owner = "herumi";
+    repo  = "ate-pairing";
+    rev = "dcb9da999b1113f90b115bccb6f4b57ddf3a8452";
+    sha256 = "0jr6r1cma414k8mhsyp7n8hqaqxi7zklsp6820a095sbb3zajckh";
+  };
+
+  buildInputs = [ gmp xbyak ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r lib $out
+    cp -r include $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Optimal Ate Pairing over Barreto-Naehrig Curves";
+    homepage = "https://github.com/herumi/ate-pairing";
+    maintainers = with maintainers; [ rht ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/altcoins/zcash/libsnark/default.nix b/pkgs/applications/altcoins/zcash/libsnark/default.nix
new file mode 100644
index 000000000000..9dd3f6886c8f
--- /dev/null
+++ b/pkgs/applications/altcoins/zcash/libsnark/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, libsodium, callPackage, boost, zlib, openssl, gmp, procps, fetchFromGitHub }:
+
+let atePairing = callPackage ./ate-pairing.nix { inherit xbyak; };
+    mie        = callPackage ./mie.nix { };
+    xbyak      = callPackage ./xbyak.nix {};
+in
+stdenv.mkDerivation rec{
+  name = "libsnark-unstable-${version}";
+  version = "2017-02-09";
+
+  src = fetchFromGitHub {
+    owner = "zcash";
+    repo  = "libsnark";
+    rev = "9ada3f84ab484c57b2247c2f41091fd6a0916573";
+    sha256 = "0vhslcb9rwqab9szavyn856z4h9w1syiamfcixqmj0s908zzlaaq";
+  };
+
+  buildInputs = [ libsodium atePairing mie xbyak zlib openssl boost gmp ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "CURVE=ALT_BN128"
+    "NO_SUPERCOP=1"
+    "STATIC=1"
+  ];
+
+  buildPhase = ''
+    CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" \
+    make lib \
+      CURVE=ALT_BN128 \
+      MULTICORE=1 \
+      STATIC=1 \
+      NO_PROCPS=1 \
+      NO_GTEST=1 \
+      FEATUREFLAGS=-DMONTGOMERY_OUTPUT \
+  '';
+
+  meta = with stdenv.lib; {
+    description = "a C++ library for zkSNARK proofs";
+    homepage = "https://github.com/zcash/libsnark";
+    maintainers = with maintainers; [ rht ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/altcoins/zcash/libsnark/mie.nix b/pkgs/applications/altcoins/zcash/libsnark/mie.nix
new file mode 100644
index 000000000000..c92c113a27a9
--- /dev/null
+++ b/pkgs/applications/altcoins/zcash/libsnark/mie.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "mie-unstable-${version}";
+  version = "2016-05-10";
+
+  src = fetchFromGitHub {
+    owner = "herumi";
+    repo  = "mie";
+    rev = "704b625b7770a8e1eab26ac65d1fed14c2fcf090";
+    sha256 = "144bpmgfs2m4qqv7a2mccgi1aq5jmlr25gnk78ryq09z8cyv88y2";
+  };
+
+  phases = ["unpackPhase" "installPhase"];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r include $out
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/herumi/mie";
+    maintainers = with maintainers; [ rht ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/altcoins/zcash/libsnark/xbyak.nix b/pkgs/applications/altcoins/zcash/libsnark/xbyak.nix
new file mode 100644
index 000000000000..c0b36ab93443
--- /dev/null
+++ b/pkgs/applications/altcoins/zcash/libsnark/xbyak.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "xbyak-unstable-${version}";
+  version = "2016-05-03";
+
+  src = fetchFromGitHub {
+    owner = "herumi";
+    repo  = "xbyak";
+    rev = "b6133a02dd6b7116bea31d0e6b7142bf97f071aa";
+    sha256 = "1rc2nx8kj2lj13whxb9chhh79f4hmjjj4j1hpqsd0lbdb60jikrn";
+  };
+
+  phases = ["unpackPhase" "installPhase"];
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp -r xbyak $out/include
+  '';
+
+  meta = with stdenv.lib; {
+    description = "JIT assembler for x86, x64";
+    homepage = "https://github.com/herumi/xbyak";
+    maintainers = with maintainers; [ rht ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
new file mode 100644
index 000000000000..4c768325fee9
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
@@ -0,0 +1,136 @@
+{ dpkg, fetchurl, lib, pkgs, stdenv, config
+, alsaLib
+, atk
+, cairo
+, coreutils
+, cups
+, dbus
+, desktop_file_utils
+, expat
+, fontconfig
+, freetype
+, gcc-unwrapped
+, gdk_pixbuf
+, glib
+, gnome2
+, libgcrypt
+, libgnome_keyring
+, libnotify
+, makeWrapper
+, nodejs
+, nspr
+, nss
+, pango
+, python2
+, udev
+, wget
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  name = "${pkgname}-${version}";
+  pkgname = "nylas-mail-bin";
+  version = "2.0.32";
+  subVersion = "fec7941";
+
+  src =
+    if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = "https://edgehill.s3-us-west-2.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb";
+        sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada";
+      }
+    else
+      throw "NylasMail is not supported on ${stdenv.system}";
+
+  propagatedBuildInputs = [
+    alsaLib
+    atk
+    cairo
+    coreutils
+    cups
+    dbus
+    desktop_file_utils
+    expat
+    fontconfig
+    freetype
+    gcc-unwrapped
+    gdk_pixbuf
+    glib
+    gnome2.GConf
+    gnome2.gtk
+    libgnome_keyring
+    libnotify
+    nodejs
+    nspr
+    nss
+    pango
+    python2
+    udev
+    wget
+    xorg.libX11
+    xorg.libXScrnSaver
+    xorg.libXcomposite
+    xorg.libXcursor
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXi
+    xorg.libXrandr
+    xorg.libXrender
+    xorg.libXtst
+    xorg.libxkbfile
+  ];
+
+
+  buildInputs = [ gnome2.gnome_keyring ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildCommand = ''
+    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 = with stdenv.lib; {
+    description = "Open-source mail client built on the modern web with Electron, React, and Flux";
+    longDescription = ''
+      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. Nylas Mail can be enabled with it's requirements by enabling 'services.nylas-mail.enable=true'. Alternatively, make sure to have services.gnome3.gnome-keyring.enable = true; in your configuration.nix before running nylas-mail. If you happen to miss this step, you should remove ~/.nylas-mail and "~/.config/Nylas Mail" for a blank setup".
+    '';
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ johnramsden ];
+    homepage = https://nylas.com;
+    platforms = [ "x86_64-linux" ];
+  };
+}