about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-09-01 14:12:19 +0100
committerGitHub <noreply@github.com>2017-09-01 14:12:19 +0100
commite316930b773771a4eb28813105ace2d1b97391e5 (patch)
tree6301128b4d89a1482139770a0f125bc1b65f1e38 /pkgs/applications
parent4ae12f099ddcf3b61d18546c58bd985bffafc6c4 (diff)
parente9203772f2e19e9abad52297d5a6cd3aaa1c89b5 (diff)
downloadnixlib-e316930b773771a4eb28813105ace2d1b97391e5.tar
nixlib-e316930b773771a4eb28813105ace2d1b97391e5.tar.gz
nixlib-e316930b773771a4eb28813105ace2d1b97391e5.tar.bz2
nixlib-e316930b773771a4eb28813105ace2d1b97391e5.tar.lz
nixlib-e316930b773771a4eb28813105ace2d1b97391e5.tar.xz
nixlib-e316930b773771a4eb28813105ace2d1b97391e5.tar.zst
nixlib-e316930b773771a4eb28813105ace2d1b97391e5.zip
Merge pull request #28824 from mguentner/pybitmessage
pybitmessage: 0.4.4 -> 0.6.2
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/instant-messengers/pybitmessage/default.nix29
1 files changed, 14 insertions, 15 deletions
diff --git a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
index ec4eb91d6ab1..78f0a9c31fc8 100644
--- a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
@@ -1,33 +1,32 @@
 { stdenv, fetchFromGitHub, pythonPackages, openssl }:
 
-stdenv.mkDerivation rec {
+pythonPackages.buildPythonApplication rec {
   name = "pybitmessage-${version}";
 
-  version = "0.4.4";
+  version = "0.6.2";
 
   src = fetchFromGitHub {
     owner = "bitmessage";
     repo = "PyBitmessage";
     rev = "v${version}";
-    sha256 = "1f4h0yc1mfjnxzvxiv9hxgak59mgr3a5ykv50vlyiay82za20jax";
+    sha256 = "04sgns9qczzw2152gqdr6bjyy4fmgs26cz8n3qck94l0j51rxhz8";
   };
 
-  buildInputs = with pythonPackages; [ python pyqt4 wrapPython ] ++ [ openssl ];
+  propagatedBuildInputs = with pythonPackages; [ msgpack pyqt4 ] ++ [ openssl ];
 
   preConfigure = ''
-    substituteInPlace Makefile \
-      --replace "PREFIX?=/usr/local" "" \
-      --replace "/usr" ""
-  '';
+    # Remove interaction and misleading output
+    substituteInPlace setup.py \
+      --replace "nothing = raw_input()" pass \
+      --replace 'print "It looks like building the package failed.\n" \' pass \
+      --replace '    "You may be missing a C++ compiler and the OpenSSL headers."' pass
+
+    substituteInPlace src/pyelliptic/openssl.py \
+      --replace "libdir.append(find_library('ssl'))" "libdir.append('${openssl.out}/lib/libssl.so')"
 
-  makeFlags = [ "DESTDIR=$(out)" ];
+    substituteInPlace src/depends.py \
+      --replace "ctypes.util.find_library('ssl')" "'${openssl.out}/lib/libssl.so'"
 
-  postInstall = ''
-    substituteInPlace $out/bin/pybitmessage \
-      --replace "exec python2" "exec ${pythonPackages.python}/bin/python" \
-      --replace "/opt/openssl-compat-bitcoin/lib/" "${openssl.out}/lib/"
-    wrapProgram $out/bin/pybitmessage \
-      --prefix PYTHONPATH : "$(toPythonPath $out):$PYTHONPATH"
   '';
 
   meta = with stdenv.lib; {