From e3d7c4ca194693b3c80734511e61719ea8d4ffb6 Mon Sep 17 00:00:00 2001 From: shak-mar Date: Fri, 16 Jun 2017 08:03:05 +0200 Subject: [PATCH 1/2] pybitmessage: 0.4.4 -> 0.6.2 squashed hashes: 3ee20b2de7c02761aeb7389821f31bbfb6626301 b9a3a3b6a25b998893a1d861849890792b9e664b (details -> #26616) --- .../pybitmessage/default.nix | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix index ec4eb91d6ab..582ff687d59 100644 --- a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix +++ b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix @@ -1,33 +1,30 @@ { 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 + ''; - makeFlags = [ "DESTDIR=$(out)" ]; - - 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" + makeWrapperArgs = '' + --prefix LD_LIBRARY_PATH : "${openssl.out}/lib/" ''; meta = with stdenv.lib; { From e9203772f2e19e9abad52297d5a6cd3aaa1c89b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20G=C3=BCntner?= Date: Fri, 1 Sep 2017 14:43:27 +0200 Subject: [PATCH 2/2] pybitmessage: replace find_library() calls with paths fixes requested changes in #26616 --- .../instant-messengers/pybitmessage/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix index 582ff687d59..78f0a9c31fc 100644 --- a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix +++ b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix @@ -21,10 +21,12 @@ pythonPackages.buildPythonApplication rec { --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')" + + substituteInPlace src/depends.py \ + --replace "ctypes.util.find_library('ssl')" "'${openssl.out}/lib/libssl.so'" - makeWrapperArgs = '' - --prefix LD_LIBRARY_PATH : "${openssl.out}/lib/" ''; meta = with stdenv.lib; {