about summary refs log tree commit diff
path: root/pkgs/applications/radio
diff options
context:
space:
mode:
authorMaciej Krüger2023-11-25 02:37:27 +0100
committerMaciej Krüger2023-11-25 14:35:33 +0100
commite3cb52705252ad0f07eae44c73aedf8972ea717f (patch)
treeb305e706a03d2a0026928106625c3bf12b8fb11a /pkgs/applications/radio
parent0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1 (diff)
qlog: make it build on mac
Diffstat (limited to 'pkgs/applications/radio')
-rw-r--r--pkgs/applications/radio/qlog/default.nix9
-rw-r--r--pkgs/applications/radio/qlog/mac.patch32
2 files changed, 40 insertions, 1 deletions
diff --git a/pkgs/applications/radio/qlog/default.nix b/pkgs/applications/radio/qlog/default.nix
index 098b51954a4e..3c0904c45b87 100644
--- a/pkgs/applications/radio/qlog/default.nix
+++ b/pkgs/applications/radio/qlog/default.nix
@@ -11,6 +11,7 @@
 , hamlib
 , qtkeychain
 , pkg-config
+, cups
 }:
 
 stdenv.mkDerivation rec {
@@ -27,6 +28,10 @@ stdenv.mkDerivation rec {
 
   env.NIX_LDFLAGS = "-lhamlib";
 
+  patches = [
+    ./mac.patch
+  ];
+
   buildInputs = [
     qtbase
     qtcharts
@@ -35,7 +40,9 @@ stdenv.mkDerivation rec {
     qtwebchannel
     hamlib
     qtkeychain
-  ];
+  ] ++ (lib.optionals stdenv.isDarwin [
+    cups
+  ]);
 
   nativeBuildInputs = [
     wrapQtAppsHook
diff --git a/pkgs/applications/radio/qlog/mac.patch b/pkgs/applications/radio/qlog/mac.patch
new file mode 100644
index 000000000000..661d508ab4e5
--- /dev/null
+++ b/pkgs/applications/radio/qlog/mac.patch
@@ -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
+