summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-08-12 18:11:44 +0100
committerGitHub <noreply@github.com>2017-08-12 18:11:44 +0100
commitbab0c74468510f7a22231eaa1a1779498e5a105c (patch)
treeafb448fb71cffe78dbbe66ab85aa9a124a771fed /pkgs
parentd5aac7482f73d3c5731a96ba613cb9176eba712f (diff)
parente93fe9a1bde82b2d9892ea44be9b62d09ddc756f (diff)
downloadnixpkgs-bab0c74468510f7a22231eaa1a1779498e5a105c.tar
nixpkgs-bab0c74468510f7a22231eaa1a1779498e5a105c.tar.gz
nixpkgs-bab0c74468510f7a22231eaa1a1779498e5a105c.tar.bz2
nixpkgs-bab0c74468510f7a22231eaa1a1779498e5a105c.tar.lz
nixpkgs-bab0c74468510f7a22231eaa1a1779498e5a105c.tar.xz
nixpkgs-bab0c74468510f7a22231eaa1a1779498e5a105c.tar.zst
nixpkgs-bab0c74468510f7a22231eaa1a1779498e5a105c.zip
Merge pull request #27974 from elitak/armory
bitcoinarmory: init at 0.96.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/bitcoinarmory/default.nix87
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 89 insertions, 0 deletions
diff --git a/pkgs/applications/misc/bitcoinarmory/default.nix b/pkgs/applications/misc/bitcoinarmory/default.nix
new file mode 100644
index 00000000000..78ac55088a4
--- /dev/null
+++ b/pkgs/applications/misc/bitcoinarmory/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, fetchFromGitHub, pythonPackages
+, pkgconfig, autoreconfHook, rsync
+, swig, qt4, fcgi
+, bitcoin, procps, utillinux
+}:
+let
+
+  version = "0.96.1";
+  sitePackages = pythonPackages.python.sitePackages;
+  inherit (pythonPackages) mkPythonDerivation pyqt4 psutil twisted;
+
+in mkPythonDerivation {
+
+  name = "bitcoinarmory-${version}";
+
+  src = fetchFromGitHub {
+    owner = "goatpig";
+    repo = "BitcoinArmory";
+    rev = "v${version}";
+    #sha256 = "023c7q1glhrkn4djz3pf28ckd1na52lsagv4iyfgchqvw7qm7yx2";
+    sha256 = "0pjk5qx16n3kvs9py62666qkwp2awkgd87by4karbj7vk6p1l14h"; fetchSubmodules = true;
+  };
+
+  # FIXME bitcoind doesn't die on shutdown. Need some sort of patch to fix that.
+  #patches = [ ./shutdown-fix.patch ];
+
+  buildInputs = [
+    pkgconfig
+    autoreconfHook
+    swig
+    qt4
+    fcgi
+    rsync # used by silly install script (TODO patch upstream)
+  ];
+
+  propagatedBuildInputs = [
+    pyqt4
+    psutil
+    twisted
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  makeWrapperArgs = [
+    "--prefix            PATH : ${bitcoin}/bin"   # for `bitcoind`
+    "--prefix            PATH : ${procps}/bin"    # for `free`
+    "--prefix            PATH : ${utillinux}/bin" # for `whereis`
+    "--suffix LD_LIBRARY_PATH : $out/lib"         # for python bindings built as .so files
+    "--run    cd\\ $out/lib/armory"               # so that GUI resources can be loaded
+  ];
+
+  # auditTmpdir runs during fixupPhase, so patchelf before that
+  preFixup = ''
+    newRpath=$(patchelf --print-rpath $out/bin/ArmoryDB | sed -r 's|(.*)(/tmp/nix-build-.*libfcgi/.libs:?)(.*)|\1\3|')
+    patchelf --set-rpath $out/lib:$newRpath $out/bin/ArmoryDB
+  '';
+
+  # fixupPhase of mkPythonDerivation wraps $out/bin/*, so this needs to come after
+  postFixup = ''
+    wrapPythonProgramsIn $out/lib/armory "$out $pythonPath"
+    ln -sf $out/lib/armory/ArmoryQt.py $out/bin/armory
+  '';
+
+  meta = {
+    description = "Bitcoin wallet with cold storage and multi-signature support";
+    longDescription = ''
+      Armory is the most secure and full featured solution available for users
+      and institutions to generate and store Bitcoin private keys. This means
+      users never have to trust the Armory team and can use it with the Glacier
+      Protocol. Satoshi would be proud!
+
+      Users are empowered with multiple encrypted Bitcoin wallets and permanent
+      one-time ‘paper backups’. Armory pioneered cold storage and distributed
+      multi-signature. Bitcoin cold storage is a system for securely storing
+      Bitcoins on a completely air-gapped offline computer.
+
+      Maintainer's note: The original authors at https://bitcoinarmory.com/
+      discontinued development. I elected instead to package GitHub user
+      @goatpig's fork, as it's the most active, at time of this writing.
+    '';
+    homepage = https://github.com/goatpig/BitcoinArmory;
+    license = stdenv.lib.licenses.agpl3Plus;
+    maintainers = with stdenv.lib.maintainers; [ elitak ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4ca0dcbc9f6..4e78b08c068 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13456,6 +13456,8 @@ with pkgs;
 
   bibletime = callPackage ../applications/misc/bibletime { };
 
+  bitcoinarmory = callPackage ../applications/misc/bitcoinarmory { pythonPackages = python2Packages; };
+
   bitkeeper = callPackage ../applications/version-management/bitkeeper {
     gperf = gperf_3_0;
   };