-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nanovna-qt: init at 20200403 (#253368)
- Loading branch information
Showing
2 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/libxavna/xavna_mock_ui/xavna_mock_ui.H b/libxavna/xavna_mock_ui/xavna_mock_ui.H | ||
index 333f9ed..819a019 100644 | ||
--- a/libxavna/xavna_mock_ui/xavna_mock_ui.H | ||
+++ b/libxavna/xavna_mock_ui/xavna_mock_ui.H | ||
@@ -2,6 +2,7 @@ | ||
#define XAVNA_MOCK_UI_H | ||
|
||
#include <functional> | ||
+#include <string> | ||
using namespace std; | ||
typedef function<void(string dut_name, double cableLen1, double cableLen2)> xavna_ui_changed_cb; | ||
|
||
diff --git a/vna_qt/firmwareupdater.H b/vna_qt/firmwareupdater.H | ||
index 7654211..8b61dfb 100644 | ||
--- a/vna_qt/firmwareupdater.H | ||
+++ b/vna_qt/firmwareupdater.H | ||
@@ -3,6 +3,7 @@ | ||
#include <string> | ||
#include <functional> | ||
#include <pthread.h> | ||
+#include <cstdint> | ||
using namespace std; | ||
|
||
class FirmwareUpdater | ||
diff --git a/vna_qt/polarview.C b/vna_qt/polarview.C | ||
index 8bde6e3..5800463 100644 | ||
--- a/vna_qt/polarview.C | ||
+++ b/vna_qt/polarview.C | ||
@@ -3,6 +3,7 @@ | ||
#include <cmath> | ||
#include <QPaintEvent> | ||
#include <QPainter> | ||
+#include <QPainterPath> | ||
PolarView::PolarView(QWidget *parent) : QWidget(parent) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
autoreconfHook, | ||
libtool, | ||
fftw, | ||
eigen, | ||
qt5, | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "nanovna-qt"; | ||
# 20200507 dropped support for NanoVNA V2.2 | ||
version = "20200403"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "nanovna-v2"; | ||
repo = "NanoVNA-QT"; | ||
rev = version; | ||
hash = "sha256-0nRpjLglCog9e4bSkaNSwjrwmLwut3Ykr3AaYZCaMEs="; | ||
}; | ||
|
||
patches = [ ./fix-build.patch ]; | ||
|
||
nativeBuildInputs = [ | ||
autoreconfHook | ||
libtool | ||
qt5.wrapQtAppsHook | ||
]; | ||
|
||
buildInputs = [ | ||
fftw | ||
eigen | ||
qt5.qtbase | ||
qt5.qtcharts | ||
]; | ||
|
||
autoreconfFlags = [ "--install" ]; | ||
|
||
postBuild = '' | ||
pushd libxavna/xavna_mock_ui/ | ||
qmake | ||
make | ||
popd | ||
pushd vna_qt/ | ||
qmake | ||
make | ||
popd | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
install -Dm555 vna_qt/vna_qt -t $out/bin/ | ||
install -Dm555 libxavna/.libs/libxavna.so.0.0.0 -t $out/lib/ | ||
ln -s libxavna.so.0.0.0 $out/lib/libxavna.so.0 | ||
ln -s libxavna.so.0.0.0 $out/lib/libxavna.so | ||
install -Dm555 libxavna/xavna_mock_ui/libxavna_mock_ui.so.1.0.0 -t $out/lib/ | ||
ln -s libxavna_mock_ui.so.1.0.0 $out/lib/libxavna_mock_ui.so.1.0 | ||
ln -s libxavna_mock_ui.so.1.0.0 $out/lib/libxavna_mock_ui.so.1 | ||
ln -s libxavna_mock_ui.so.1.0.0 $out/lib/libxavna_mock_ui.so | ||
runHook postInstall | ||
''; | ||
|
||
preFixup = '' | ||
qtWrapperArgs+=(--prefix LD_LIBRARY_PATH : "$out/lib") | ||
''; | ||
|
||
meta = { | ||
description = "PC GUI software for NanoVNA V2 series"; | ||
homepage = "https://nanorfe.com/nanovna-v2.html"; | ||
mainProgram = "vna_qt"; | ||
license = lib.licenses.gpl2Only; | ||
changelog = "https://github.com/nanovna-v2/NanoVNA-QT/releases/tag/v${version}"; | ||
maintainers = with lib.maintainers; [ chuangzhu ]; | ||
platforms = lib.platforms.linux; | ||
}; | ||
} |