about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorNikolay Korotkiy <sikmir@disroot.org>2023-07-24 21:10:42 +0400
committerGitHub <noreply@github.com>2023-07-24 21:10:42 +0400
commit8f23952d556d3a5283b91f4e04e8e2c808d4ec42 (patch)
tree73a0dc6fe40206312d92ed6351f8080682cb49fe /pkgs/misc
parente7a19aa23a3313bdd104a167c6a29509becd6261 (diff)
parentfb9dba73f3ef76847c6716a3c0c4a16673e99686 (diff)
Merge pull request #245113 from sikmir/opcua-client-gui
opcua-client-gui: enable on darwin
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/opcua-client-gui/default.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/misc/opcua-client-gui/default.nix b/pkgs/misc/opcua-client-gui/default.nix
index 2c684060758f4..361b2627c9735 100644
--- a/pkgs/misc/opcua-client-gui/default.nix
+++ b/pkgs/misc/opcua-client-gui/default.nix
@@ -1,22 +1,32 @@
 { lib
-, python3
+, stdenv
+, python3Packages
 , fetchFromGitHub
 , makeDesktopItem
 , copyDesktopItems
+, desktopToDarwinBundle
+, wrapQtAppsHook
 }:
 
-python3.pkgs.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
   pname = "opcua-client-gui";
   version = "0.8.4";
 
   src = fetchFromGitHub {
     owner = "FreeOpcUa";
-    repo = pname;
+    repo = "opcua-client-gui";
     rev = version;
     hash = "sha256-0BH1Txr3z4a7iFcsfnovmBUreXMvIX2zpZa8QivQVx8=";
   };
 
-  propagatedBuildInputs = with python3.pkgs; [
+  nativeBuildInputs = [ copyDesktopItems wrapQtAppsHook ]
+    ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];
+
+  makeWrapperArgs = [
+    "\${qtWrapperArgs[@]}"
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
     pyqt5
     asyncua
     opcua-widgets
@@ -43,7 +53,7 @@ python3.pkgs.buildPythonApplication rec {
   meta = with lib; {
     description = "OPC UA GUI Client";
     homepage = "https://github.com/FreeOpcUa/opcua-client-gui";
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ janik ];
   };