2022-05-18 14:49:53 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
python3,
|
|
|
|
fetchFromGitHub,
|
2023-02-02 18:25:31 +00:00
|
|
|
fetchpatch,
|
2022-05-18 14:49:53 +00:00
|
|
|
wrapQtAppsHook,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
2022-05-18 14:49:53 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-10-27 00:29:36 +00:00
|
|
|
pname = "nanovna-saver";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.5.4";
|
2020-10-27 00:29:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NanoVNA-Saver";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-CLfgDQt2rOXtWwvEhlXEstPp28nFhuhiAPYL6EjZVu4=";
|
2020-10-27 00:29:36 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
# Fix for https://github.com/NanoVNA-Saver/nanovna-saver/issues/579
|
|
|
|
# Try dropping the patch in the next release after v0.5.4
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "remote-changelog-from-setup-py.patch";
|
|
|
|
url = "https://github.com/NanoVNA-Saver/${pname}/commit/d654ea0441939e4e1c599d1333b587a185394fbe.diff";
|
|
|
|
sha256 = "sha256-ifOhiWD0EYyQZRKp2W3G6crmWslca+/21APmhpfP/xE=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2020-10-27 00:29:36 +00:00
|
|
|
cython
|
2021-06-28 23:13:55 +00:00
|
|
|
scipy
|
2020-10-27 00:29:36 +00:00
|
|
|
pyqt5
|
|
|
|
pyserial
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
2020-10-27 00:29:36 +00:00
|
|
|
"''${qtWrapperArgs[@]}"
|
2021-06-28 23:13:55 +00:00
|
|
|
)
|
2020-10-27 00:29:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/NanoVNA-Saver/nanovna-saver";
|
|
|
|
description =
|
|
|
|
"A tool for reading, displaying and saving data from the NanoVNA";
|
|
|
|
longDescription = ''
|
|
|
|
A multiplatform tool to save Touchstone files from the NanoVNA, sweep
|
|
|
|
frequency spans in segments to gain more than 101 data points, and
|
|
|
|
generally display and analyze the resulting data.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3Only;
|
2023-02-02 18:25:31 +00:00
|
|
|
maintainers = with maintainers; [ zaninime tmarkus ];
|
2020-10-27 00:29:36 +00:00
|
|
|
};
|
|
|
|
}
|