uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
103
pkgs/applications/blockchains/monero-gui/default.nix
Normal file
103
pkgs/applications/blockchains/monero-gui/default.nix
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{ lib, stdenv, wrapQtAppsHook, makeDesktopItem
|
||||
, fetchFromGitHub
|
||||
, cmake, qttools, pkg-config
|
||||
, qtbase, qtdeclarative, qtgraphicaleffects
|
||||
, qtmultimedia, qtxmlpatterns
|
||||
, qtquickcontrols, qtquickcontrols2
|
||||
, qtmacextras
|
||||
, monero-cli, miniupnpc, unbound, readline
|
||||
, boost, libunwind, libsodium, pcsclite
|
||||
, randomx, zeromq, libgcrypt, libgpg-error
|
||||
, hidapi, rapidjson, quirc
|
||||
, trezorSupport ? true, libusb1, protobuf, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "monero-gui";
|
||||
version = "0.17.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "monero-project";
|
||||
repo = "monero-gui";
|
||||
rev = "v${version}";
|
||||
sha256 = "10gincmgc0qpsgm94m1fqfy9j8jn9g1gjk12lcqnf77kvcnz37hq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake pkg-config wrapQtAppsHook
|
||||
(lib.getDev qttools)
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qtbase qtdeclarative qtgraphicaleffects
|
||||
qtmultimedia qtquickcontrols qtquickcontrols2
|
||||
qtxmlpatterns
|
||||
monero-cli miniupnpc unbound readline
|
||||
randomx libgcrypt libgpg-error
|
||||
boost libunwind libsodium pcsclite
|
||||
zeromq hidapi rapidjson quirc
|
||||
] ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ]
|
||||
++ lib.optionals stdenv.isDarwin [ qtmacextras ];
|
||||
|
||||
postUnpack = ''
|
||||
# copy monero sources here
|
||||
# (needs to be writable)
|
||||
cp -r ${monero-cli.source}/* source/monero
|
||||
chmod -R +w source/monero
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./move-log-file.patch
|
||||
./use-system-libquirc.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# set monero-gui version
|
||||
substituteInPlace src/version.js.in \
|
||||
--replace '@VERSION_TAG_GUI@' '${version}'
|
||||
|
||||
# use monerod from the monero package
|
||||
substituteInPlace src/daemon/DaemonManager.cpp \
|
||||
--replace 'QApplication::applicationDirPath() + "' '"${monero-cli}/bin'
|
||||
|
||||
# 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)' \
|
||||
--replace 'add_subdirectory(external)' ""
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DARCH=default" ];
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "monero-wallet-gui";
|
||||
exec = "monero-wallet-gui";
|
||||
icon = "monero";
|
||||
desktopName = "Monero";
|
||||
genericName = "Wallet";
|
||||
categories = [ "Network" "Utility" ];
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
# install desktop entry
|
||||
install -Dm644 -t $out/share/applications \
|
||||
${desktopItem}/share/applications/*
|
||||
|
||||
# install icons
|
||||
for n in 16 24 32 48 64 96 128 256; do
|
||||
size=$n"x"$n
|
||||
install -Dm644 \
|
||||
-t $out/share/icons/hicolor/$size/apps/monero.png \
|
||||
$src/images/appicons/$size.png
|
||||
done;
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Private, secure, untraceable currency";
|
||||
homepage = "https://getmonero.org/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ rnhmjoj ];
|
||||
};
|
||||
}
|
||||
14
pkgs/applications/blockchains/monero-gui/move-log-file.patch
Normal file
14
pkgs/applications/blockchains/monero-gui/move-log-file.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/src/main/main.cpp b/src/main/main.cpp
|
||||
index c5210e5f..45794d72 100644
|
||||
--- a/src/main/main.cpp
|
||||
+++ b/src/main/main.cpp
|
||||
@@ -220,6 +220,9 @@ int main(int argc, char *argv[])
|
||||
QCommandLineOption logPathOption(QStringList() << "l" << "log-file",
|
||||
QCoreApplication::translate("main", "Log to specified file"),
|
||||
QCoreApplication::translate("main", "file"));
|
||||
+ logPathOption.setDefaultValue(
|
||||
+ QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
|
||||
+ + "/monero-wallet-gui.log");
|
||||
|
||||
QCommandLineOption testQmlOption("test-qml");
|
||||
testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp);
|
||||
|
|
@ -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())
|
||||
Loading…
Add table
Add a link
Reference in a new issue