supercell-wx: 0.4.9 -> 0.5.3, cleanup

Diff:
https://github.com/dpaulat/supercell-wx/compare/v0.4.9-release...v0.5.3-release

Changelog:
https://github.com/dpaulat/supercell-wx/releases/tag/v0.5.3-release

Co-authored-by: aware70 <7832566+aware70@users.noreply.github.com>
This commit is contained in:
Gaetan Lepage 2025-10-21 13:34:57 +00:00
parent e0eb97764a
commit 84c49e758c
6 changed files with 165 additions and 113 deletions

View file

@ -1,44 +1,50 @@
{
stdenv,
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
aws-sdk-cpp,
bzip2,
replaceVars,
tracy,
# nativeBuildInputs
cmake,
ninja,
zlib,
openssl,
curl,
glew,
geos,
qt6,
# buildInputs
aws-sdk-cpp,
boost,
spdlog,
stb,
bzip2,
geos,
geographiclib,
glew,
glm,
gtest,
howard-hinnant-date,
libSM,
libcpr,
libpng,
libSM,
geographiclib,
howard-hinnant-date,
re2,
gtest,
glm,
qt6,
onetbb,
tracy,
replaceVars,
openssl,
python3,
range-v3,
re2,
spdlog,
stb,
zlib,
}:
let
gtestSkip = [
# Skip tests requiring network access
"AwsLevel*DataProvider.FindKeyNow"
"AwsLevel*DataProvider.FindKeyFixed"
"AwsLevel*DataProvider.LoadObjectByKey"
"AwsLevel*DataProvider.Refresh"
"AwsLevel*DataProvider.FindKeyNow"
"AwsLevel*DataProvider.GetAvailableProducts"
"AwsLevel*DataProvider.GetTimePointsByDate"
"AwsLevel*DataProvider.LoadObjectByKey"
"AwsLevel*DataProvider.Prune"
"AwsLevel*DataProvider.Refresh"
"IemApiProviderTest.*"
"NtpClient.*"
"NwsApiProviderTest.*"
"UpdateManagerTest.CheckForUpdates"
"WarningsProvider*\"https"
@ -50,47 +56,16 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "supercell-wx";
version = "0.4.9";
version = "0.5.3";
src = fetchFromGitHub {
owner = "dpaulat";
repo = "supercell-wx";
rev = "refs/tags/v${finalAttrs.version}-release";
sha256 = "sha256-3fVUxbGosN4Y4h8BJXUV7DNv7VZTma+IsV94+Zt8DCA=";
tag = "v${finalAttrs.version}-release";
fetchSubmodules = true;
hash = "sha256-1n1WXBLco2TpyhS8KA1tk6HzRIXLqS6YV3aYagoQiTM=";
};
meta = {
homepage = "https://supercell-wx.rtfd.io";
downloadPage = "https://github.com/dpaulat/supercell-wx/releases";
description = "Live visualization of NEXRAD weather data and alerts";
longDescription = ''
Supercell Wx is a free, open source application to visualize live and
archive NEXRAD Level 2 and Level 3 data, and severe weather alerts.
It displays continuously updating weather data on top of a responsive
map, providing the capability to monitor weather events using
reflectivity, velocity, and other products.
'';
license = lib.licenses.mit;
mainProgram = "supercell-wx";
platforms = [
"x86_64-linux"
# "aarch64-linux"
];
maintainers = with lib.maintainers; [ aware70 ];
};
env.CXXFLAGS = "-Wno-error=restrict -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=stringop-overflow -DQT_NO_USE_NODISCARD_FILE_OPEN";
env.GTEST_FILTER = "-${lib.concatStringsSep ":" gtestSkip}";
doCheck = true;
# These tests aren't built by 'all', but ctest still tries to run them.
cmakeFlags = [
"-DCMAKE_CTEST_ARGUMENTS=-E;'test_mln_core|test_mln_widgets'"
"-DSTB_INCLUDE_DIR=${stb}/include/stb"
"-DFETCHCONTENT_SOURCE_DIR_TRACY=${tracy.src}"
];
patches = [
# These are for Nix compatibility {{{
./patches/use-find-package.patch # Replace some vendored dependencies with Nix provided versions
@ -105,6 +80,7 @@ stdenv.mkDerivation (finalAttrs: {
# These may be or already are submitted upstream {{{
./patches/explicit-link-aws-crt.patch # fix missing symbols from aws-crt-cpp
./patches/fix-qt-6.10.patch
./patches/fix-find-opengl.patch
# }}}
];
@ -114,6 +90,28 @@ stdenv.mkDerivation (finalAttrs: {
--replace-fail "CMAKE_SOURCE_DIR" "PROJECT_SOURCE_DIR"
'';
env = {
CXXFLAGS = lib.concatStringsSep " " [
"-Wno-error=deprecated-declarations"
"-Wno-error=maybe-uninitialized"
"-Wno-error=restrict"
"-Wno-error=stringop-overflow"
"-DQT_NO_USE_NODISCARD_FILE_OPEN"
];
GTEST_FILTER = "-${lib.concatStringsSep ":" gtestSkip}";
};
cmakeFlags = [
# CMake Error at external/aws-sdk-cpp/crt/aws-crt-cpp/cmake/EnforceSubmoduleVersions.cmake:18 (message):
# ENFORCE_SUBMODULE_VERSIONS is ON but Git was not found.
(lib.cmakeBool "ENFORCE_SUBMODULE_VERSIONS" false)
# These tests aren't built by 'all', but ctest still tries to run them.
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "-E;'test_mln_core|test_mln_widgets'")
(lib.cmakeFeature "STB_INCLUDE_DIR" "${stb}/include/stb")
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_TRACY" "${tracy.src}")
];
nativeBuildInputs = [
cmake
ninja
@ -121,36 +119,37 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
zlib
openssl
qt6.qtbase
qt6.qttools
qt6.qtmultimedia
qt6.qtpositioning
qt6.qtimageformats
aws-sdk-cpp
howard-hinnant-date
boost
onetbb
glew
bzip2
geos
spdlog
stb
libcpr
libpng
libSM
re2
openssl
# FIXME: split outputs aren't working with find_package. Possibly related to nixpkgs/issues/144170 ?
(geographiclib.overrideAttrs {
outputs = [ "out" ];
})
gtest
glew
glm
bzip2
gtest
howard-hinnant-date
libSM
libcpr
libpng
onetbb
openssl
(python3.withPackages (ps: [
ps.geopandas
ps.jinja2
]))
qt6.qtbase
qt6.qtimageformats
qt6.qtmultimedia
qt6.qtpositioning
qt6.qttools
re2
range-v3
spdlog
stb
zlib
];
# Currently crashes on wayland; must force X11
@ -158,10 +157,33 @@ stdenv.mkDerivation (finalAttrs: {
"--set QT_QPA_PLATFORM xcb"
];
doCheck = true;
# Install .desktop file and icons
postInstall = ''
install -m0644 -D "$src/scwx-qt/res/linux/supercell-wx.desktop" "$out/share/applications/supercell-wx.desktop"
install -m0644 -D "$src/scwx-qt/res/icons/scwx-256.png" "$out/share/icons/hicolor/256x256/apps/supercell-wx.png"
install -m0644 -D "$src/scwx-qt/res/icons/scwx-64.png" "$out/share/icons/hicolor/64x64/apps/supercell-wx.png"
'';
meta = {
homepage = "https://supercell-wx.rtfd.io";
downloadPage = "https://github.com/dpaulat/supercell-wx/releases";
description = "Live visualization of NEXRAD weather data and alerts";
changelog = "https://github.com/dpaulat/supercell-wx/releases/tag/${finalAttrs.src.tag}";
longDescription = ''
Supercell Wx is a free, open source application to visualize live and
archive NEXRAD Level 2 and Level 3 data, and severe weather alerts.
It displays continuously updating weather data on top of a responsive
map, providing the capability to monitor weather events using
reflectivity, velocity, and other products.
'';
license = lib.licenses.mit;
mainProgram = "supercell-wx";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
maintainers = with lib.maintainers; [ aware70 ];
};
})

View file

@ -1,12 +1,12 @@
diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake
index 47ada181..a1beea15 100644
index 36911947..451efc13 100644
--- a/wxdata/wxdata.cmake
+++ b/wxdata/wxdata.cmake
@@ -280,6 +280,7 @@ endif()
@@ -320,6 +320,7 @@ endif()
target_link_libraries(wxdata PUBLIC aws-cpp-sdk-core
aws-cpp-sdk-s3
+ aws-crt-cpp
cpr::cpr
LibXml2::LibXml2
re2::re2
OpenSSL::Crypto

View file

@ -1,22 +1,24 @@
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
index cda6c7f..32d807a 100644
index 648b6578..4833b9c2 100644
--- a/scwx-qt/scwx-qt.cmake
+++ b/scwx-qt/scwx-qt.cmake
@@ -601,6 +601,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
Boost::json
@@ -776,6 +776,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
Boost::timer
Boost::atomic
QMapLibre::Core
+ QMapLibre::Widgets
$<$<CXX_COMPILER_ID:MSVC>:opengl32>
$<$<CXX_COMPILER_ID:MSVC>:SetupAPI>
Fontconfig::Fontconfig
GeographicLib::GeographicLib
@@ -615,40 +616,13 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
@@ -793,18 +794,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
target_link_libraries(supercell-wx PRIVATE scwx-qt
wxdata)
-# Set DT_RUNPATH for Linux targets
-set_target_properties(MLNQtCore PROPERTIES INSTALL_RPATH "\$ORIGIN/../lib") # QMapLibre::Core
-set_target_properties(supercell-wx PROPERTIES INSTALL_RPATH "\$ORIGIN/../lib")
-if (LINUX)
- # Set DT_RUNPATH for Linux targets
- set_target_properties(MLNQtCore PROPERTIES INSTALL_RPATH "\$ORIGIN/../lib") # QMapLibre::Core
- set_target_properties(supercell-wx PROPERTIES INSTALL_RPATH "\$ORIGIN/../lib")
-endif()
-
install(TARGETS supercell-wx
- MLNQtCore # QMapLibre::Core
@ -26,7 +28,8 @@ index cda6c7f..32d807a 100644
- "^(/usr)?/lib/.*\\.so(\\..*)?"
RUNTIME
COMPONENT supercell-wx
LIBRARY
BUNDLE
@@ -819,24 +809,6 @@ install(TARGETS supercell-wx
COMPONENT supercell-wx
OPTIONAL)
@ -48,6 +51,6 @@ index cda6c7f..32d807a 100644
-install(SCRIPT ${deploy_script_scwx}
- COMPONENT supercell-wx)
-
if (MSVC)
set(CPACK_PACKAGE_NAME "Supercell Wx")
set(CPACK_PACKAGE_VENDOR "Dan Paulat")
if (APPLE)
# Install additional script to fix up the bundle
install(CODE [[

View file

@ -0,0 +1,27 @@
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
index 648b6578..3f1d8070 100644
--- a/scwx-qt/scwx-qt.cmake
+++ b/scwx-qt/scwx-qt.cmake
@@ -18,7 +18,7 @@ find_package(Fontconfig)
find_package(geographiclib)
find_package(geos)
find_package(glm)
-find_package(OpenGL)
+find_package(OpenGL REQUIRED)
find_package(Python COMPONENTS Interpreter)
find_package(SQLite3)
@@ -759,12 +759,7 @@ if (LINUX)
target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::WaylandClient)
endif()
-if (LINUX)
- find_package(mesa-glu REQUIRED)
- target_link_libraries(scwx-qt PUBLIC mesa-glu::mesa-glu)
-else()
- target_link_libraries(scwx-qt PUBLIC OpenGL::GLU)
-endif()
+target_link_libraries(scwx-qt PUBLIC OpenGL::GLU)
target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::OpenGLWidgets

View file

@ -1,5 +1,5 @@
diff --git a/scwx-qt/tools/generate_versions.py b/scwx-qt/tools/generate_versions.py
index c6c94020..3fcdcf08 100644
index c6c94020..000f6e6e 100644
--- a/scwx-qt/tools/generate_versions.py
+++ b/scwx-qt/tools/generate_versions.py
@@ -1,6 +1,5 @@
@ -9,7 +9,7 @@ index c6c94020..3fcdcf08 100644
import json
import os
import pathlib
@@ -110,27 +109,22 @@ def ParseArguments():
@@ -110,27 +109,23 @@ def ParseArguments():
required = True)
return parser.parse_args()
@ -25,7 +25,7 @@ index c6c94020..3fcdcf08 100644
print("Collecting version info")
versionInfo = VersionInfo()
-
- repo = git.Repo(args.gitRepo_, search_parent_directories = True)
-
- commitString = str(repo.head.commit)[:10]
@ -43,7 +43,7 @@ index c6c94020..3fcdcf08 100644
- versionInfo.copyrightYear_ = copyrightYear
- versionInfo.resourceDir_ = resourceDir
+ versionInfo.commitString_ = "@rev@"
+ versionInfo.copyrightYear_ = GetYearFromLicense(args.gitRepo_ / 'LICENSE.txt')
+ versionInfo.copyrightYear_ = GetYearFromLicense(args.gitRepo_ / "LICENSE.txt")
+ versionInfo.resourceDir_ = str(args.gitRepo_).replace("\\", "\\\\")
versionInfo.versionString_ = args.version_

View file

@ -1,63 +1,63 @@
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 2137ae62..041cb87d 100644
index 1039e96e..16f2c84a 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -14,7 +14,7 @@ set_property(DIRECTORY
@@ -15,7 +15,7 @@ set_property(DIRECTORY
units.cmake
qt6ct.cmake)
-include(aws-sdk-cpp.cmake)
+find_package(AWSSDK CONFIG REQUIRED)
include(date.cmake)
include(glad.cmake)
include(hsluv-c.cmake)
include(imgui.cmake)
diff --git a/external/stb.cmake b/external/stb.cmake
index 570af425..f9817226 100644
index 570af425..f2e7b2c8 100644
--- a/external/stb.cmake
+++ b/external/stb.cmake
@@ -1,4 +1,3 @@
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.24)
set(PROJECT_NAME scwx-stb)
-set(STB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stb PARENT_SCOPE)
+# Nix: set STB_INCLUDE_DIR in cmake flags
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
index 09ea6fe3..c20a2cb6 100644
index 4833b9c2..641fc637 100644
--- a/scwx-qt/scwx-qt.cmake
+++ b/scwx-qt/scwx-qt.cmake
@@ -11,14 +11,15 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -13,14 +13,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
OPTION(SCWX_DISABLE_CONSOLE "Disables the Windows console in release mode" ON)
-find_package(Boost)
+find_package(Boost REQUIRED COMPONENTS json timer)
+find_package(Boost REQUIRED COMPONENTS json timer atomic)
find_package(Fontconfig)
-find_package(geographiclib)
+find_package(GeographicLib)
find_package(geos)
find_package(GLEW)
find_package(glm)
find_package(OpenGL)
find_package(Python COMPONENTS Interpreter)
find_package(SQLite3)
+find_package(PNG)
find_package(QT NAMES Qt6
COMPONENTS Gui
@@ -699,6 +700,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
imgui
@@ -789,6 +790,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
qt6ct-common
qt6ct-widgets
SQLite::SQLite3
+ PNG::PNG
wxdata)
target_link_libraries(supercell-wx PRIVATE scwx-qt
diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake
index 94b0e3a7..a36c2c81 100644
index 451efc13..86cbb42b 100644
--- a/wxdata/wxdata.cmake
+++ b/wxdata/wxdata.cmake
@@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.24)
@@ -4,7 +4,8 @@ project(scwx-data)
project(scwx-data)
include(CheckCXXSymbolExists)
-find_package(Boost)
+find_package(Boost REQUIRED COMPONENTS iostreams)