Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 qtbase,
7 qttools,
8 sqlcipher,
9 wrapQtAppsHook,
10 qtmacextras,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "sqlitebrowser";
15 version = "3.13.1";
16
17 src = fetchFromGitHub {
18 owner = "sqlitebrowser";
19 repo = "sqlitebrowser";
20 rev = "v${finalAttrs.version}";
21 sha256 = "sha256-bpZnO8i8MDgOm0f93pBmpy1sZLJQ9R4o4ZLnGfT0JRg=";
22 };
23
24 patches = lib.optional stdenv.hostPlatform.isDarwin ./macos.patch;
25
26 # We should be using qscintilla from nixpkgs instead of the vendored version,
27 # but qscintilla is currently in a bit of a mess as some consumers expect a
28 # -qt4 or -qt5 prefix while others do not.
29 # We *really* should get that cleaned up.
30 buildInputs = [
31 qtbase
32 sqlcipher
33 ]
34 ++ lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
35
36 nativeBuildInputs = [
37 cmake
38 qttools
39 wrapQtAppsHook
40 ];
41
42 cmakeFlags = [
43 "-Dsqlcipher=1"
44 (lib.cmakeBool "ENABLE_TESTING" (finalAttrs.finalPackage.doCheck or false))
45 ];
46
47 doCheck = true;
48
49 meta = with lib; {
50 description = "DB Browser for SQLite";
51 mainProgram = "sqlitebrowser";
52 homepage = "https://sqlitebrowser.org/";
53 license = licenses.gpl3;
54 maintainers = with maintainers; [ peterhoeg ];
55 platforms = platforms.unix;
56 };
57})