2024-09-19 14:19:46 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake
|
|
|
|
, qtbase, qttools, sqlcipher, wrapQtAppsHook, qtmacextras
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "sqlitebrowser";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "3.13.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-09-19 14:19:46 +00:00
|
|
|
owner = "sqlitebrowser";
|
|
|
|
repo = "sqlitebrowser";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
sha256 = "sha256-bpZnO8i8MDgOm0f93pBmpy1sZLJQ9R4o4ZLnGfT0JRg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
patches = lib.optional stdenv.hostPlatform.isDarwin ./macos.patch;
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
# We should be using qscintilla from nixpkgs instead of the vendored version,
|
|
|
|
# but qscintilla is currently in a bit of a mess as some consumers expect a
|
|
|
|
# -qt4 or -qt5 prefix while others do not.
|
|
|
|
# We *really* should get that cleaned up.
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = [ qtbase sqlcipher ] ++ lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-Dsqlcipher=1"
|
2024-09-19 14:19:46 +00:00
|
|
|
(lib.cmakeBool "ENABLE_TESTING" (finalAttrs.doCheck or false))
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "DB Browser for SQLite";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sqlitebrowser";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://sqlitebrowser.org/";
|
|
|
|
license = licenses.gpl3;
|
2020-06-15 15:56:04 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2024-09-19 14:19:46 +00:00
|
|
|
})
|