about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-09-27 17:44:35 +0200
committerlassulus <lassulus@lassul.us>2017-09-27 17:44:35 +0200
commit64d63907d8083c6e569b12f30a7fa1212ba04bd5 (patch)
treefbb50808d48c29e71977aaa29bcd34161fef5a02 /pkgs/applications
parente253ae7d3a4ab992d2432c87514e3333a3cf744d (diff)
downloadnixlib-64d63907d8083c6e569b12f30a7fa1212ba04bd5.tar
nixlib-64d63907d8083c6e569b12f30a7fa1212ba04bd5.tar.gz
nixlib-64d63907d8083c6e569b12f30a7fa1212ba04bd5.tar.bz2
nixlib-64d63907d8083c6e569b12f30a7fa1212ba04bd5.tar.lz
nixlib-64d63907d8083c6e569b12f30a7fa1212ba04bd5.tar.xz
nixlib-64d63907d8083c6e569b12f30a7fa1212ba04bd5.tar.zst
nixlib-64d63907d8083c6e569b12f30a7fa1212ba04bd5.zip
electron-cash: init at 2.9.3
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/electron-cash/default.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix
new file mode 100644
index 000000000000..a45ab59ace8e
--- /dev/null
+++ b/pkgs/applications/misc/electron-cash/default.nix
@@ -0,0 +1,66 @@
+{ stdenv, fetchFromGitHub, python2Packages }:
+
+python2Packages.buildPythonApplication rec {
+  version = "2.9.3";
+  name = "electron-cash-${version}";
+
+  src = fetchFromGitHub {
+    owner = "fyookball";
+    repo = "electrum";
+    rev = version;
+    sha256 = "1r39b5ag5fipzgr84pzb53cfm8a4dy53257608754dwr1gfpma3v";
+  };
+
+  propagatedBuildInputs = with python2Packages; [
+    dns
+    ecdsa
+    jsonrpclib
+    pbkdf2
+    pyaes
+    pycrypto
+    pyqt4
+    pysocks
+    qrcode
+    requests
+    tlslite
+
+    # plugins
+    keepkey
+    trezor
+  ];
+
+  preBuild = ''
+    sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py
+    pyrcc4 icons.qrc -o gui/qt/icons_rc.py
+    # Recording the creation timestamps introduces indeterminism to the build
+    sed -i '/Created: .*/d' gui/qt/icons_rc.py
+  '';
+
+  postInstall = ''
+    # Despite setting usr_share above, these files are installed under
+    # $out/nix ...
+    mv $out/lib/python2.7/site-packages/nix/store"/"*/share $out
+    rm -rf $out/lib/python2.7/site-packages/nix
+
+    substituteInPlace $out/share/applications/electron.desktop \
+      --replace "Exec=electrum %u" "Exec=$out/bin/electrum %u"
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/electrum help >/dev/null
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A lightweight Bitcoin wallet";
+    longDescription = ''
+      An easy-to-use Bitcoin client featuring wallets generated from
+      mnemonic seeds (in addition to other, more advanced, wallet options)
+      and the ability to perform transactions without downloading a copy
+      of the blockchain.
+    '';
+    homepage = https://www.electroncash.org/;
+    maintainers = with maintainers; [ lassulus ];
+    license = licenses.mit;
+  };
+}