From e91daf327d5b8dec070601cd22aebb5083dfe9e7 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sun, 23 Mar 2014 11:22:57 -0400 Subject: [PATCH] electrum: initial expression Electrum is a Bitcoin thin-wallet. https://electrum.org --- pkgs/applications/misc/electrum/default.nix | 32 +++++++++++++++++++ .../python-modules/ecdsa/default.nix | 18 +++++++++++ .../python-modules/slowaes/default.nix | 16 ++++++++++ pkgs/top-level/all-packages.nix | 6 ++++ 4 files changed, 72 insertions(+) create mode 100644 pkgs/applications/misc/electrum/default.nix create mode 100644 pkgs/development/python-modules/ecdsa/default.nix create mode 100644 pkgs/development/python-modules/slowaes/default.nix diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix new file mode 100644 index 000000000000..c35a2c7ff821 --- /dev/null +++ b/pkgs/applications/misc/electrum/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, pythonPackages, slowaes, ecdsa, pyqt4 }: + +pythonPackages.buildPythonPackage rec { + name = "electrum-${version}"; + version = "1.9.8"; + + src = fetchurl { + url = "https://download.electrum.org/Electrum-${version}.tar.gz"; + sha256 = "8fc144a32013e4a747fea27fff981762a6b9e14cde9ffb405c4c721975d846ff"; + }; + + buildInputs = [ slowaes ecdsa ]; + + propagatedBuildInputs = [ + slowaes + ecdsa + pyqt4 + ]; + + postPatch = '' + mkdir -p $out/share + sed -i 's@usr_share = .*@usr_share = os.getenv("out")+"/share"@' setup.py + ''; + + meta = { + description = "Bitcoin thin-wallet"; + long-description = "Electrum is an easy to use Bitcoin client. It protects you from losing coins in a backup mistake or computer failure, because your wallet can be recovered from a secret phrase that you can write on paper or learn by heart. There is no waiting time when you start the client, because it does not download the Bitcoin blockchain."; + homepage = "https://electrum.org"; + license = stdenv.lib.licenses.gpl3; + maintainers = [ "emery@vfemail.net" ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/ecdsa/default.nix b/pkgs/development/python-modules/ecdsa/default.nix new file mode 100644 index 000000000000..f668f3c6ac3b --- /dev/null +++ b/pkgs/development/python-modules/ecdsa/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, buildPythonPackage, openssl }: + +buildPythonPackage rec { + name = "ecdsa-0.11"; + + src = fetchurl { + url = "https://pypi.python.org/packages/source/e/ecdsa/${name}.tar.gz"; + sha256 = "134mbq5xsvx54k9xm7zrizvh9imxmcz1w9mhyfr99p4i7wcnqfwf"; + }; + + buildInputs = [ openssl ]; + + meta = { + homepage = "http://github.com/warner/python-ecdsa"; + description = "pure-python ECDSA signature/verification"; + license = stdenv.lib.licenses.mit; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/slowaes/default.nix b/pkgs/development/python-modules/slowaes/default.nix new file mode 100644 index 000000000000..ef793d7e1208 --- /dev/null +++ b/pkgs/development/python-modules/slowaes/default.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchurl, buildPythonPackage }: + +buildPythonPackage rec { + name = "slowaes-0.1a1"; + + src = fetchurl { + url = "https://pypi.python.org/packages/source/s/slowaes/${name}.tar.gz"; + sha256 = "83658ae54cc116b96f7fdb12fdd0efac3a4e8c7c7064e3fac3f4a881aa54bf09"; + }; + + meta = { + homepage = "http://code.google.com/p/slowaes/"; + description = "AES implemented in pure python"; + license = stdenv.lib.licenses.apache; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24f1543fc83d..95109679e8be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6157,6 +6157,8 @@ let bsddb3 = callPackage ../development/python-modules/bsddb3 { }; + ecdsa = callPackage ../development/python-modules/ecdsa { }; + numeric = callPackage ../development/python-modules/numeric { }; pil = pythonPackages.pil; @@ -6215,6 +6217,8 @@ let setuptools = pythonPackages.setuptools; + slowaes = callPackage ../development/python-modules/slowaes { }; + wxPython = pythonPackages.wxPython; wxPython28 = pythonPackages.wxPython28; @@ -7765,6 +7769,8 @@ let ekho = callPackage ../applications/audio/ekho { }; + electrum = callPackage ../applications/misc/electrum { }; + elinks = callPackage ../applications/networking/browsers/elinks { }; elvis = callPackage ../applications/editors/elvis { };