summary refs log tree commit diff
path: root/pkgs/applications/blockchains
diff options
context:
space:
mode:
authorMichele Guerini Rocco <rnhmjoj@users.noreply.github.com>2021-05-02 13:53:40 +0200
committerGitHub <noreply@github.com>2021-05-02 13:53:40 +0200
commitd5fe3a127079ecb1c15569b80d61bb36b60ab50e (patch)
treee5c313d5b7ae9c966afa2408f877110d60c1e7cf /pkgs/applications/blockchains
parentd50819f1a17cdd661779d82c35d000eddb9a1ea0 (diff)
parent3227f676cb168b9310b0f386e37ad706c1f84b8c (diff)
Merge pull request #121488 from rnhmjoj/monero
quirc: 2016-08-16 -> 2020-04-06;  monero: 0.17.1.9 -> 0.17.2.0; monero-gui: 0.17.1.9 -> 0.17.2.1
Diffstat (limited to 'pkgs/applications/blockchains')
-rw-r--r--pkgs/applications/blockchains/monero-gui/default.nix26
-rw-r--r--pkgs/applications/blockchains/monero-gui/use-system-libquirc.patch37
-rw-r--r--pkgs/applications/blockchains/monero/default.nix4
3 files changed, 49 insertions, 18 deletions
diff --git a/pkgs/applications/blockchains/monero-gui/default.nix b/pkgs/applications/blockchains/monero-gui/default.nix
index 5f430bc8869e9..47df64b514f10 100644
--- a/pkgs/applications/blockchains/monero-gui/default.nix
+++ b/pkgs/applications/blockchains/monero-gui/default.nix
@@ -17,22 +17,15 @@
 
 with lib;
 
-let
-  arch = if stdenv.isx86_64  then "x86-64"
-    else if stdenv.isi686    then "i686"
-    else if stdenv.isAarch64 then "armv8-a"
-    else throw "unsupported architecture";
-in
-
 stdenv.mkDerivation rec {
   pname = "monero-gui";
-  version = "0.17.1.9";
+  version = "0.17.2.1";
 
   src = fetchFromGitHub {
     owner  = "monero-project";
     repo   = "monero-gui";
     rev    = "v${version}";
-    sha256 = "0143mmxk0jfb5pmjlx6v0knvf8v49kmkpjxlp6rw8lwnlf71xadn";
+    sha256 = "1apjvpvn6hg0k0ak6wpg4prcdcslnb6fqhzzg2p4iy846f0ai9ji";
   };
 
   nativeBuildInputs = [
@@ -58,7 +51,10 @@ stdenv.mkDerivation rec {
     chmod -R +w source/monero
   '';
 
-  patches = [ ./move-log-file.patch ];
+  patches = [
+    ./move-log-file.patch
+    ./use-system-libquirc.patch
+  ];
 
   postPatch = ''
     # set monero-gui version
@@ -69,17 +65,15 @@ stdenv.mkDerivation rec {
     substituteInPlace src/daemon/DaemonManager.cpp \
       --replace 'QApplication::applicationDirPath() + "' '"${monero}/bin'
 
-    # only build external deps, *not* the full monero
+    # 1: only build external deps, *not* the full monero
+    # 2: use nixpkgs libraries
     substituteInPlace CMakeLists.txt \
       --replace 'add_subdirectory(monero)' \
-                'add_subdirectory(monero EXCLUDE_FROM_ALL)'
-
-    # use nixpkgs quirc
-    substituteInPlace CMakeLists.txt \
+                'add_subdirectory(monero EXCLUDE_FROM_ALL)' \
       --replace 'add_subdirectory(external)' ""
   '';
 
-  cmakeFlags = [ "-DARCH=${arch}" ];
+  cmakeFlags = [ "-DARCH=default" ];
 
   desktopItem = makeDesktopItem {
     name = "monero-wallet-gui";
diff --git a/pkgs/applications/blockchains/monero-gui/use-system-libquirc.patch b/pkgs/applications/blockchains/monero-gui/use-system-libquirc.patch
new file mode 100644
index 0000000000000..b60057294b109
--- /dev/null
+++ b/pkgs/applications/blockchains/monero-gui/use-system-libquirc.patch
@@ -0,0 +1,37 @@
+diff --git a/src/QR-Code-scanner/CMakeLists.txt b/src/QR-Code-scanner/CMakeLists.txt
+index 15e288df..2e9b3305 100644
+--- a/src/QR-Code-scanner/CMakeLists.txt
++++ b/src/QR-Code-scanner/CMakeLists.txt
+@@ -1,11 +1,18 @@
++find_library(QUIRC_LIBRARY quirc REQUIRED)
++find_path(QUIRC_INCLUDE_DIR quirc.h REQUIRED)
++
+ add_library(qrdecoder STATIC
+     Decoder.cpp
+ )
++target_include_directories(qrdecoder
++    PUBLIC
++        ${QUIRC_INCLUDE_DIR}
++)
+ target_link_libraries(qrdecoder
+     PUBLIC
+         Qt5::Gui
+     PRIVATE
+-        quirc
++        ${QUIRC_LIBRARY}
+ )
+ 
+ if(WITH_SCANNER)
+diff --git a/src/QR-Code-scanner/Decoder.cpp b/src/QR-Code-scanner/Decoder.cpp
+index 1bb99140..353ca189 100644
+--- a/src/QR-Code-scanner/Decoder.cpp
++++ b/src/QR-Code-scanner/Decoder.cpp
+@@ -30,7 +30,7 @@
+ 
+ #include <limits>
+ 
+-#include "quirc.h"
++#include <quirc.h>
+ 
+ QrDecoder::QrDecoder()
+     : m_qr(quirc_new())
diff --git a/pkgs/applications/blockchains/monero/default.nix b/pkgs/applications/blockchains/monero/default.nix
index 3be8b908c7a2d..2a12bfe872b6b 100644
--- a/pkgs/applications/blockchains/monero/default.nix
+++ b/pkgs/applications/blockchains/monero/default.nix
@@ -17,13 +17,13 @@ assert trezorSupport -> all (x: x!=null) [ libusb1 protobuf python3 ];
 
 stdenv.mkDerivation rec {
   pname = "monero";
-  version = "0.17.1.9";
+  version = "0.17.2.0";
 
   src = fetchFromGitHub {
     owner = "monero-project";
     repo = "monero";
     rev = "v${version}";
-    sha256 = "0jqss4csvkcrhrmaa3vrnyv6yiwqpbfw7037clx9xcfm4qrrfiwy";
+    sha256 = "0jwlmrpzisvw1c06cvd5b3s3hd4w0pa1qmrypfwah67qj3x6hnb6";
     fetchSubmodules = true;
   };