Merge pull request #269770 from mkg20001/qlogmac

This commit is contained in:
Maciej Krüger 2023-12-08 18:09:24 +01:00 committed by GitHub
commit ee4af090f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 1 deletions

View file

@ -11,6 +11,7 @@
, hamlib , hamlib
, qtkeychain , qtkeychain
, pkg-config , pkg-config
, cups
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -27,6 +28,10 @@ stdenv.mkDerivation rec {
env.NIX_LDFLAGS = "-lhamlib"; env.NIX_LDFLAGS = "-lhamlib";
patches = [
./mac.patch
];
buildInputs = [ buildInputs = [
qtbase qtbase
qtcharts qtcharts
@ -35,7 +40,9 @@ stdenv.mkDerivation rec {
qtwebchannel qtwebchannel
hamlib hamlib
qtkeychain qtkeychain
]; ] ++ (lib.optionals stdenv.isDarwin [
cups
]);
nativeBuildInputs = [ nativeBuildInputs = [
wrapQtAppsHook wrapQtAppsHook

View file

@ -0,0 +1,32 @@
From 2b0ed30806b34315962da382cb41edf5f19b231e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= <mkg20001@gmail.com>
Date: Sat, 25 Nov 2023 14:22:24 +0100
Subject: [PATCH] Add installation to PREFIX on mac when set
This allows the app to be shipped in a non-bundeled version
We need this to ship the app on macOS with nix
---
QLog.pro | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/QLog.pro b/QLog.pro
index db6686f..576bfe1 100644
--- a/QLog.pro
+++ b/QLog.pro
@@ -386,6 +386,12 @@ macx: {
equals(QT_MAJOR_VERSION, 6): LIBS += -lqt6keychain
equals(QT_MAJOR_VERSION, 5): LIBS += -lqt5keychain
DISTFILES +=
+
+ # This allows the app to be shipped in a non-bundeled version
+ !isEmpty(PREFIX) {
+ target.path = $$PREFIX
+ INSTALLS += target
+ }
}
win32: {
--
2.42.0