1{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake
2, qtbase, qttools, sqlcipher, wrapGAppsHook3, qtmacextras
3}:
4
5mkDerivation rec {
6 pname = "sqlitebrowser";
7 version = "3.12.2";
8
9 src = fetchFromGitHub {
10 owner = pname;
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "sha256-33iVic0kxemWld+SiHOWGlKFSi5fpk1RtLUiNDr7WNI=";
14 };
15
16 # We should be using qscintilla from nixpkgs instead of the vendored version,
17 # but qscintilla is currently in a bit of a mess as some consumers expect a
18 # -qt4 or -qt5 prefix while others do not.
19 # We *really* should get that cleaned up.
20 buildInputs = [ qtbase sqlcipher ] ++ lib.optionals stdenv.isDarwin [ qtmacextras ];
21
22 nativeBuildInputs = [ cmake qttools wrapGAppsHook3 ];
23
24 cmakeFlags = [
25 "-Dsqlcipher=1"
26 ];
27
28 meta = with lib; {
29 description = "DB Browser for SQLite";
30 mainProgram = "sqlitebrowser";
31 homepage = "https://sqlitebrowser.org/";
32 license = licenses.gpl3;
33 maintainers = with maintainers; [ peterhoeg ];
34 platforms = platforms.unix;
35 };
36}