1{
2 lib,
3 stdenv,
4 python3Packages,
5 fetchFromGitHub,
6 makeDesktopItem,
7 copyDesktopItems,
8 desktopToDarwinBundle,
9 wrapQtAppsHook,
10}:
11
12python3Packages.buildPythonApplication rec {
13 pname = "opcua-client-gui";
14 version = "0.8.4";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "FreeOpcUa";
19 repo = "opcua-client-gui";
20 rev = version;
21 hash = "sha256-0BH1Txr3z4a7iFcsfnovmBUreXMvIX2zpZa8QivQVx8=";
22 };
23
24 nativeBuildInputs = [
25 copyDesktopItems
26 wrapQtAppsHook
27 ]
28 ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ];
29
30 makeWrapperArgs = [
31 "\${qtWrapperArgs[@]}"
32 ];
33
34 propagatedBuildInputs = with python3Packages; [
35 pyqt5
36 asyncua
37 opcua-widgets
38 numpy
39 pyqtgraph
40 ];
41
42 #This test uses a deprecated libarby, when updating the package check if the test was updated as well
43 doCheck = false;
44
45 desktopItems = [
46 (makeDesktopItem {
47 name = "opcua-client";
48 exec = "opcua-client";
49 comment = "OPC UA Client";
50 type = "Application";
51 #no icon because the app dosn't have one
52 desktopName = "opcua-client";
53 terminal = false;
54 categories = [ "Utility" ];
55 })
56 ];
57
58 meta = with lib; {
59 description = "OPC UA GUI Client";
60 homepage = "https://github.com/FreeOpcUa/opcua-client-gui";
61 platforms = platforms.unix;
62 license = licenses.gpl3Only;
63 maintainers = [ ];
64 mainProgram = "opcua-client";
65 };
66}