lol

nanovna-qt: init at 20200403 (#253368)

authored by

Arne Keller and committed by
GitHub
9de99ed5 255bca1a

+114
+36
pkgs/by-name/na/nanovna-qt/fix-build.patch
··· 1 + diff --git a/libxavna/xavna_mock_ui/xavna_mock_ui.H b/libxavna/xavna_mock_ui/xavna_mock_ui.H 2 + index 333f9ed..819a019 100644 3 + --- a/libxavna/xavna_mock_ui/xavna_mock_ui.H 4 + +++ b/libxavna/xavna_mock_ui/xavna_mock_ui.H 5 + @@ -2,6 +2,7 @@ 6 + #define XAVNA_MOCK_UI_H 7 + 8 + #include <functional> 9 + +#include <string> 10 + using namespace std; 11 + typedef function<void(string dut_name, double cableLen1, double cableLen2)> xavna_ui_changed_cb; 12 + 13 + diff --git a/vna_qt/firmwareupdater.H b/vna_qt/firmwareupdater.H 14 + index 7654211..8b61dfb 100644 15 + --- a/vna_qt/firmwareupdater.H 16 + +++ b/vna_qt/firmwareupdater.H 17 + @@ -3,6 +3,7 @@ 18 + #include <string> 19 + #include <functional> 20 + #include <pthread.h> 21 + +#include <cstdint> 22 + using namespace std; 23 + 24 + class FirmwareUpdater 25 + diff --git a/vna_qt/polarview.C b/vna_qt/polarview.C 26 + index 8bde6e3..5800463 100644 27 + --- a/vna_qt/polarview.C 28 + +++ b/vna_qt/polarview.C 29 + @@ -3,6 +3,7 @@ 30 + #include <cmath> 31 + #include <QPaintEvent> 32 + #include <QPainter> 33 + +#include <QPainterPath> 34 + PolarView::PolarView(QWidget *parent) : QWidget(parent) 35 + { 36 +
+78
pkgs/by-name/na/nanovna-qt/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + autoreconfHook, 6 + libtool, 7 + fftw, 8 + eigen, 9 + qt5, 10 + }: 11 + 12 + stdenv.mkDerivation rec { 13 + pname = "nanovna-qt"; 14 + # 20200507 dropped support for NanoVNA V2.2 15 + version = "20200403"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "nanovna-v2"; 19 + repo = "NanoVNA-QT"; 20 + rev = version; 21 + hash = "sha256-0nRpjLglCog9e4bSkaNSwjrwmLwut3Ykr3AaYZCaMEs="; 22 + }; 23 + 24 + patches = [ ./fix-build.patch ]; 25 + 26 + nativeBuildInputs = [ 27 + autoreconfHook 28 + libtool 29 + qt5.wrapQtAppsHook 30 + ]; 31 + 32 + buildInputs = [ 33 + fftw 34 + eigen 35 + qt5.qtbase 36 + qt5.qtcharts 37 + ]; 38 + 39 + autoreconfFlags = [ "--install" ]; 40 + 41 + postBuild = '' 42 + pushd libxavna/xavna_mock_ui/ 43 + qmake 44 + make 45 + popd 46 + pushd vna_qt/ 47 + qmake 48 + make 49 + popd 50 + ''; 51 + 52 + installPhase = '' 53 + runHook preInstall 54 + install -Dm555 vna_qt/vna_qt -t $out/bin/ 55 + install -Dm555 libxavna/.libs/libxavna.so.0.0.0 -t $out/lib/ 56 + ln -s libxavna.so.0.0.0 $out/lib/libxavna.so.0 57 + ln -s libxavna.so.0.0.0 $out/lib/libxavna.so 58 + install -Dm555 libxavna/xavna_mock_ui/libxavna_mock_ui.so.1.0.0 -t $out/lib/ 59 + ln -s libxavna_mock_ui.so.1.0.0 $out/lib/libxavna_mock_ui.so.1.0 60 + ln -s libxavna_mock_ui.so.1.0.0 $out/lib/libxavna_mock_ui.so.1 61 + ln -s libxavna_mock_ui.so.1.0.0 $out/lib/libxavna_mock_ui.so 62 + runHook postInstall 63 + ''; 64 + 65 + preFixup = '' 66 + qtWrapperArgs+=(--prefix LD_LIBRARY_PATH : "$out/lib") 67 + ''; 68 + 69 + meta = { 70 + description = "PC GUI software for NanoVNA V2 series"; 71 + homepage = "https://nanorfe.com/nanovna-v2.html"; 72 + mainProgram = "vna_qt"; 73 + license = lib.licenses.gpl2Only; 74 + changelog = "https://github.com/nanovna-v2/NanoVNA-QT/releases/tag/v${version}"; 75 + maintainers = with lib.maintainers; [ chuangzhu ]; 76 + platforms = lib.platforms.linux; 77 + }; 78 + }