tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
wfview: init at 2.10
Cryolitia PukNgae
9 months ago
9d500f45
1a270ec3
+245
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
wf
wfview
package.nix
remove-hard-encodings.patch
+74
pkgs/by-name/wf/wfview/package.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
stdenv,
4
4
+
fetchFromGitLab,
5
5
+
eigen,
6
6
+
hidapi,
7
7
+
libopus,
8
8
+
libpulseaudio,
9
9
+
portaudio,
10
10
+
qt6,
11
11
+
qt6Packages,
12
12
+
rtaudio,
13
13
+
}:
14
14
+
15
15
+
stdenv.mkDerivation (finalAttrs: {
16
16
+
pname = "wfview";
17
17
+
version = "2.10";
18
18
+
19
19
+
src = fetchFromGitLab {
20
20
+
owner = "eliggett";
21
21
+
repo = "wfview";
22
22
+
rev = "v${finalAttrs.version}";
23
23
+
hash = "sha256-bFTblsDtFAakbSJfSfKgvoxd1DTSv++rxU6R3/uWo+4=";
24
24
+
};
25
25
+
26
26
+
patches = [
27
27
+
# Remove syscalls during build to make it reproducible
28
28
+
# We also need to adjust some header paths for darwin
29
29
+
./remove-hard-encodings.patch
30
30
+
];
31
31
+
32
32
+
buildInputs =
33
33
+
[
34
34
+
eigen
35
35
+
hidapi
36
36
+
libopus
37
37
+
portaudio
38
38
+
rtaudio
39
39
+
qt6.qtbase
40
40
+
qt6.qtserialport
41
41
+
qt6.qtmultimedia
42
42
+
qt6.qtwebsockets
43
43
+
qt6Packages.qcustomplot
44
44
+
]
45
45
+
++ lib.optionals stdenv.hostPlatform.isLinux [
46
46
+
libpulseaudio
47
47
+
];
48
48
+
49
49
+
nativeBuildInputs = with qt6; [
50
50
+
wrapQtAppsHook
51
51
+
qmake
52
52
+
];
53
53
+
54
54
+
env.LANG = "C.UTF-8";
55
55
+
56
56
+
qmakeFlags = [ "wfview.pro" ];
57
57
+
58
58
+
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
59
59
+
mkdir -pv $out/Applications
60
60
+
mv -v "$out/bin/wfview.app" $out/Applications
61
61
+
62
62
+
# wrap executable to $out/bin
63
63
+
makeWrapper "$out/Applications/wfview.app/Contents/MacOS/wfview" "$out/bin/wfview"
64
64
+
'';
65
65
+
66
66
+
meta = {
67
67
+
description = "Open-source software for the control of modern Icom radios";
68
68
+
homepage = "https://wfview.org/";
69
69
+
license = lib.licenses.gpl3Only;
70
70
+
platforms = lib.platforms.unix;
71
71
+
mainProgram = "wfview";
72
72
+
maintainers = with lib.maintainers; [ Cryolitia ];
73
73
+
};
74
74
+
})
+171
pkgs/by-name/wf/wfview/remove-hard-encodings.patch
···
1
1
+
diff --git a/audioconverter.h b/audioconverter.h
2
2
+
index d3cf510..308725d 100644
3
3
+
--- a/audioconverter.h
4
4
+
+++ b/audioconverter.h
5
5
+
@@ -20,13 +20,8 @@
6
6
+
#endif
7
7
+
8
8
+
/* Opus and Eigen */
9
9
+
-#ifndef Q_OS_LINUX
10
10
+
-#include "opus.h"
11
11
+
-#include <Eigen/Eigen>
12
12
+
-#else
13
13
+
#include "opus/opus.h"
14
14
+
#include <eigen3/Eigen/Eigen>
15
15
+
-#endif
16
16
+
17
17
+
#include "wfviewtypes.h"
18
18
+
19
19
+
diff --git a/audiodevices.h b/audiodevices.h
20
20
+
index 3521eb5..0569e49 100644
21
21
+
--- a/audiodevices.h
22
22
+
+++ b/audiodevices.h
23
23
+
@@ -13,11 +13,7 @@
24
24
+
#include <QFontMetrics>
25
25
+
26
26
+
#include <portaudio.h>
27
27
+
-#ifndef Q_OS_LINUX
28
28
+
-#include "RtAudio.h"
29
29
+
-#else
30
30
+
#include "rtaudio/RtAudio.h"
31
31
+
-#endif
32
32
+
33
33
+
#include "wfviewtypes.h"
34
34
+
35
35
+
diff --git a/rthandler.h b/rthandler.h
36
36
+
index b422cc2..02b1117 100644
37
37
+
--- a/rthandler.h
38
38
+
+++ b/rthandler.h
39
39
+
@@ -6,11 +6,7 @@
40
40
+
#include <QThread>
41
41
+
#include <QMutex>
42
42
+
43
43
+
-#ifndef Q_OS_LINUX
44
44
+
-#include "RtAudio.h"
45
45
+
-#else
46
46
+
#include "rtaudio/RtAudio.h"
47
47
+
-#endif
48
48
+
49
49
+
50
50
+
#include <QAudioFormat>
51
51
+
diff --git a/tciserver.h b/tciserver.h
52
52
+
index 9b38886..af56763 100644
53
53
+
--- a/tciserver.h
54
54
+
+++ b/tciserver.h
55
55
+
@@ -9,13 +9,8 @@
56
56
+
#include "cachingqueue.h"
57
57
+
58
58
+
/* Opus and Eigen */
59
59
+
-#ifndef Q_OS_LINUX
60
60
+
-#include "opus.h"
61
61
+
-#include <Eigen/Eigen>
62
62
+
-#else
63
63
+
#include "opus/opus.h"
64
64
+
#include <eigen3/Eigen/Eigen>
65
65
+
-#endif
66
66
+
67
67
+
#define TCI_AUDIO_LENGTH 4096
68
68
+
struct tciCommandStruct
69
69
+
diff --git a/wfmain.h b/wfmain.h
70
70
+
index 0404fda..e400a74 100644
71
71
+
--- a/wfmain.h
72
72
+
+++ b/wfmain.h
73
73
+
@@ -68,11 +68,7 @@
74
74
+
#include <memory>
75
75
+
76
76
+
#include <portaudio.h>
77
77
+
-#ifndef Q_OS_LINUX
78
78
+
-#include "RtAudio.h"
79
79
+
-#else
80
80
+
#include "rtaudio/RtAudio.h"
81
81
+
-#endif
82
82
+
83
83
+
#ifdef USB_CONTROLLER
84
84
+
#ifdef Q_OS_WIN
85
85
+
diff --git a/wfview.pro b/wfview.pro
86
86
+
index a0943bd..e8f97e1 100644
87
87
+
--- a/wfview.pro
88
88
+
+++ b/wfview.pro
89
89
+
@@ -62,10 +62,8 @@ win32:DEFINES += __WINDOWS_WASAPI__
90
90
+
#linux:DEFINES += __LINUX_OSS__
91
91
+
linux:DEFINES += __LINUX_PULSE__
92
92
+
macx:DEFINES += __MACOSX_CORE__
93
93
+
-!linux:SOURCES += ../rtaudio/RTAudio.cpp
94
94
+
-!linux:HEADERS += ../rtaudio/RTAUdio.h
95
95
+
-!linux:INCLUDEPATH += ../rtaudio
96
96
+
97
97
+
+macx:LIBS += -lrtaudio
98
98
+
linux:LIBS += -lpulse -lpulse-simple -lrtaudio -lpthread -ludev
99
99
+
100
100
+
win32:INCLUDEPATH += ../portaudio/include
101
101
+
@@ -107,8 +105,6 @@ win32:RC_ICONS = "resources/icons/Windows/wfview 512x512.ico"
102
102
+
103
103
+
macx{
104
104
+
ICON = resources/wfview.icns
105
105
+
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15
106
106
+
- QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
107
107
+
MY_ENTITLEMENTS.name = CODE_SIGN_ENTITLEMENTS
108
108
+
MY_ENTITLEMENTS.value = resources/wfview.entitlements
109
109
+
QMAKE_MAC_XCODE_SETTINGS += MY_ENTITLEMENTS
110
110
+
@@ -120,8 +116,7 @@ macx{
111
111
+
112
112
+
QMAKE_TARGET_BUNDLE_PREFIX = org.wfview
113
113
+
114
114
+
-!win32:DEFINES += HOST=\\\"`hostname`\\\" UNAME=\\\"`whoami`\\\"
115
115
+
-!win32:DEFINES += GITSHORT="\\\"$(shell git -C \"$$PWD\" rev-parse --short HEAD)\\\""
116
116
+
+!win32:DEFINES += HOST=\\\"nixos\\\" UNAME=\\\"nix\\\" GITSHORT=\\\"0.0\\\"
117
117
+
118
118
+
win32:DEFINES += GITSHORT=\\\"$$system(git -C $$PWD rev-parse --short HEAD)\\\"
119
119
+
win32:DEFINES += HOST=\\\"$$system(hostname)\\\"
120
120
+
@@ -169,19 +164,8 @@ macx:LIBS += -framework CoreAudio -framework CoreFoundation -lpthread -lopus
121
121
+
122
122
+
CONFIG(debug, release|debug) {
123
123
+
124
124
+
- macos:LIBS += -L ../qcustomplot/qcustomplot-sharedlib/build -lqcustomplotd
125
125
+
-
126
126
+
- lessThan(QT_MAJOR_VERSION, 6) {
127
127
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlotd.so/ {print \"-lQCustomPlotd\"}'")
128
128
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd2.so/ {print \"-lqcustomplotd2\"}'")
129
129
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd.so/ {print \"-lqcustomplotd\"}'")
130
130
+
-
131
131
+
- } else {
132
132
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlotdQt6.so/ {print \"-lQCustomPlotdQt6\"}'")
133
133
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd2qt6.so/ {print \"-lqcustomplotd2qt6\"}'")
134
134
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotdqt6.so/ {print \"-lqcustomplotdqt6\"}'")
135
135
+
- }
136
136
+
-
137
137
+
+ macos:LIBS += -lqcustomplotd
138
138
+
+ linux:LIBS += -lqcustomplotd
139
139
+
win32 {
140
140
+
contains(QMAKE_TARGET.arch, x86_64) {
141
141
+
LIBS += -L../opus/win32/VS2015/x64/DebugDLL/
142
142
+
@@ -211,17 +195,8 @@ CONFIG(debug, release|debug) {
143
143
+
}
144
144
+
} else {
145
145
+
146
146
+
- macos:LIBS += -L ../qcustomplot/qcustomplot-sharedlib/build -lqcustomplot
147
147
+
-
148
148
+
- lessThan(QT_MAJOR_VERSION, 6) {
149
149
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlot.so/ {print \"-lQCustomPlot\"}'")
150
150
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot2.so/ {print \"-lqcustomplot2\"}'")
151
151
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot.so/ {print \"-lqcustomplot\"}'")
152
152
+
- } else {
153
153
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlotQt6.so/ {print \"-lQCustomPlotQt6\"}'")
154
154
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot2qt6.so/ {print \"-lqcustomplot2qt6\"}'")
155
155
+
- linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotqt6.so/ {print \"-lqcustomplotqt6\"}'")
156
156
+
- }
157
157
+
+ macos:LIBS += -lqcustomplot
158
158
+
+ linux:LIBS += -lqcustomplot
159
159
+
win32 {
160
160
+
contains(QMAKE_TARGET.arch, x86_64) {
161
161
+
LIBS += -L../opus/win32/VS2015/x64/ReleaseDLL/
162
162
+
@@ -264,9 +239,6 @@ win32:LIBS += -lopus -lole32 -luser32
163
163
+
#macx:HEADERS += ../qcustomplot/qcustomplot.h
164
164
+
165
165
+
win32:INCLUDEPATH += ../qcustomplot
166
166
+
-!linux:INCLUDEPATH += ../opus/include
167
167
+
-!linux:INCLUDEPATH += ../eigen
168
168
+
-!linux:INCLUDEPATH += ../r8brain-free-src
169
169
+
170
170
+
INCLUDEPATH += resampler
171
171
+