File tree Expand file tree Collapse file tree 2 files changed +97
-1
lines changed Expand file tree Collapse file tree 2 files changed +97
-1
lines changed Original file line number Diff line number Diff line change 17
17
18
18
overlays . default = overlay ;
19
19
20
- packages . ${ system } . default = pkgs . python3 . withPackages ( ps : [ ps . cadquery ] ) ;
20
+ packages . ${ system } . default = pkgs . cq-editor ;
21
21
22
22
checks . ${ system } = {
23
23
deadcode =
Original file line number Diff line number Diff line change
1
+ {
2
+ lib ,
3
+ fetchFromGitHub ,
4
+ makeDesktopItem ,
5
+ copyDesktopItems ,
6
+ python3Packages ,
7
+ qt5 ,
8
+ } :
9
+ let
10
+ rev = "089bb86" ;
11
+ in
12
+ python3Packages . buildPythonApplication {
13
+ pname = "cq-editor" ;
14
+ version = rev ;
15
+
16
+ src = fetchFromGitHub {
17
+ owner = "CadQuery" ;
18
+ repo = "CQ-editor" ;
19
+ rev = rev ;
20
+ hash = "sha256-VYWjOclpH3mfI/6bj4oMKvTj3plAR3mBYTHZE3bkW70=" ;
21
+ } ;
22
+
23
+ dependencies = with python3Packages ; [
24
+ cadquery
25
+ logbook
26
+ nlopt
27
+ pyqt5
28
+ pyparsing
29
+ pyqtgraph
30
+ cq-kit
31
+ cq-warehouse
32
+ spyder
33
+ pathpy
34
+ qtconsole
35
+ requests
36
+ ] ;
37
+
38
+ build-system = with python3Packages ; [ setuptools ] ;
39
+
40
+ nativeBuildInputs = [
41
+ copyDesktopItems
42
+ qt5 . wrapQtAppsHook
43
+ ] ;
44
+
45
+ # cq-editor crashes when trying to use Wayland, so force xcb
46
+ qtWrapperArgs = [ "--set QT_QPA_PLATFORM xcb" ] ;
47
+
48
+ postFixup = ''
49
+ wrapQtApp "$out/bin/cq-editor"
50
+ '' ;
51
+
52
+ postInstall = ''
53
+ install -Dm644 icons/cadquery_logo_dark.svg $out/share/icons/hicolor/scalable/apps/cadquery.svg
54
+
55
+ rm $out/bin/CQ-editor
56
+ '' ;
57
+
58
+ nativeCheckInputs = with python3Packages ; [
59
+ pytestCheckHook
60
+ pytest-xvfb
61
+ pytest-mock
62
+ pytestcov
63
+ pytest-repeat
64
+ pytest-qt
65
+ ] ;
66
+
67
+ # requires X server
68
+ doCheck = false ;
69
+
70
+ desktopItems = [
71
+ ( makeDesktopItem {
72
+ name = "com.cadquery.CadQuery" ;
73
+ desktopName = "CadQuery" ;
74
+ icon = "cadquery" ;
75
+ exec = "cq-editor %f" ;
76
+ categories = [
77
+ "Graphics"
78
+ "3DGraphics"
79
+ "Engineering"
80
+ ] ;
81
+ type = "Application" ;
82
+ comment = "CadQuery GUI editor based on PyQT" ;
83
+ } )
84
+ ] ;
85
+
86
+ meta = with lib ; {
87
+ description = "CadQuery GUI editor based on PyQT" ;
88
+ homepage = "https://github.com/CadQuery/CQ-editor" ;
89
+ license = licenses . asl20 ;
90
+ maintainers = with maintainers ; [
91
+ costrouc
92
+ marcus7070
93
+ ] ;
94
+ } ;
95
+
96
+ }
You can’t perform that action at this time.
0 commit comments