monero-gui: 0.17.1.9 -> 0.17.2.1

This commit is contained in:
rnhmjoj 2021-05-02 11:41:56 +02:00
parent 26d524374f
commit 3227f676cb
No known key found for this signature in database
GPG Key ID: BFBAF4C975F76450
2 changed files with 47 additions and 16 deletions

View File

@ -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";

View File

@ -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())