push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
diff -ru source/CMakeLists.txt source-patched/CMakeLists.txt
--- source/CMakeLists.txt 1970-01-01 01:00:01.000000000 +0100
+++ source-patched/CMakeLists.txt 2024-09-03 11:09:48.289053141 +0200
@@ -39,9 +39,7 @@
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-if(APPLE)
- add_executable(${PROJECT_NAME} MACOSX_BUNDLE)
-elseif(WIN32)
+if(WIN32)
add_executable(${PROJECT_NAME} WIN32)
else()
add_executable(${PROJECT_NAME})
@@ -106,33 +104,6 @@
list(PREPEND CMAKE_PREFIX_PATH ${QT5_PATH} ${SQLITE3_PATH})
endif()
-
-if(APPLE)
- # For Intel Mac's
- if(EXISTS /usr/local/opt/qt5)
- list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
- endif()
-
- # For Apple Silicon Mac's
- if(EXISTS /opt/homebrew/opt/qt5)
- list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/qt5")
- endif()
- if(EXISTS /opt/homebrew/opt/sqlitefts5)
- list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlitefts5")
- endif()
-
- # For Apple Silicon Mac's and install dependencies via our Homebrew tap(sqlitebrowser/homebrew-tap)
- if(customTap AND EXISTS /opt/homebrew/opt/)
- list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlb-qt@5")
- list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/sqlb-sqlite")
-
- if(sqlcipher)
- list(APPEND SQLCIPHER_INCLUDE_DIR "/opt/homebrew/include")
- list(APPEND SQLCIPHER_LIBRARY "/opt/homebrew/opt/sqlb-sqlcipher/lib/libsqlcipher.0.dylib")
- endif()
- endif()
-endif()
-
find_package(Qt5 REQUIRED COMPONENTS Concurrent Gui LinguistTools Network PrintSupport Test Widgets Xml)
if(NOT FORCE_INTERNAL_QSCINTILLA)
@@ -439,13 +410,6 @@
set(LIBSQLITE_NAME SQLite3)
endif()
-# add extra library path for MacOS and FreeBSD
-set(EXTRAPATH APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-if(EXTRAPATH)
- list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlite/lib)
- list(PREPEND CMAKE_PREFIX_PATH /usr/local/opt/sqlitefts5/lib)
-endif()
-
find_package(${LIBSQLITE_NAME})
if (sqlcipher)
target_link_libraries(${PROJECT_NAME} SQLCipher::SQLCipher)
@@ -510,7 +474,7 @@
endif()
endif()
-if((NOT WIN32 AND NOT APPLE) OR MINGW)
+if(NOT WIN32 OR MINGW)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -630,14 +594,6 @@
)
endif()
-if(APPLE)
- set_target_properties(${PROJECT_NAME} PROPERTIES
- BUNDLE True
- OUTPUT_NAME "DB Browser for SQLite"
- MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/src/app.plist
- )
-endif()
-
# CPack configuration
set(CPACK_STRIP_FILES ON)
set(CPACK_DEBIAN_PACKAGE_PRIORITY optional)

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
libsForQt5,
sqlcipher,
}:
let
qt' = libsForQt5; # upstream has adopted qt6, but no released version supports it
in
stdenv.mkDerivation (finalAttrs: {
pname = "sqlitebrowser";
version = "3.13.1";
src = fetchFromGitHub {
owner = "sqlitebrowser";
repo = "sqlitebrowser";
tag = "v${finalAttrs.version}";
hash = "sha256-bpZnO8i8MDgOm0f93pBmpy1sZLJQ9R4o4ZLnGfT0JRg=";
};
patches = lib.optional stdenv.hostPlatform.isDarwin ./macos.patch;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail '"Unknown"' '"${finalAttrs.src.rev}"'
''
# Fix build with CMake 4
# Will be part of the Qt6 port
# Note: The vendored version of qhexedit is incompatible with our qhexedit2: https://github.com/sqlitebrowser/sqlitebrowser/issues/1808
+ ''
substituteInPlace libs/qhexedit/CMakeLists.txt \
--replace-fail 'cmake_minimum_required(VERSION 2.8.12.2)' 'cmake_minimum_required(VERSION 3.16)'
'';
buildInputs = [
qt'.qtbase
qt'.qcustomplot
qt'.qscintilla
sqlcipher
]
++ lib.optional stdenv.hostPlatform.isDarwin qt'.qtmacextras;
nativeBuildInputs = [
cmake
pkg-config
qt'.qttools
qt'.wrapQtAppsHook
];
cmakeFlags = [
"-Wno-dev"
(lib.cmakeBool "sqlcipher" true)
(lib.cmakeBool "ENABLE_TESTING" (finalAttrs.finalPackage.doCheck or false))
(lib.cmakeBool "FORCE_INTERNAL_QSCINTILLA" false)
(lib.cmakeBool "FORCE_INTERNAL_QCUSTOMPLOT" false)
(lib.cmakeBool "FORCE_INTERNAL_QHEXEDIT" true) # TODO: package qhexedit
(lib.cmakeFeature "QSCINTILLA_INCLUDE_DIR" "${lib.getDev qt'.qscintilla}/include")
];
env.LANG = "C.UTF-8";
doCheck = true;
meta = {
description = "DB Browser for SQLite";
mainProgram = "sqlitebrowser";
homepage = "https://sqlitebrowser.org/";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ peterhoeg ];
platforms = lib.platforms.unix;
};
})