@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, qt5, sqlite, cmake }:
1+{ stdenv, fetchFromGitHub, qtbase, qttools, makeQtWrapper, sqlite, cmake }:
22
33stdenv.mkDerivation rec {
44 version = "3.9.1";
@@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
1111 sha256 = "1s7f2d7wx2i68x60z7wdws3il6m83k5n5w5wyjvr0mz0mih0s150";
1212 };
1313
14− buildInputs = [ qt5.qtbase qt5.qttools sqlite cmake ];
14+ buildInputs = [ qtbase qttools sqlite ];
15+ nativeBuildInputs = [ makeQtWrapper cmake ];
1516
1617 enableParallelBuilding = true;
1718
@@ -19,10 +20,13 @@ stdenv.mkDerivation rec {
1920
2021 # A regression was introduced in CMakeLists.txt on v3.9.x
2122 # See https://github.com/sqlitebrowser/sqlitebrowser/issues/832 and issues/755
22− patchPhase = ''
23+ postPatch = ''
2324 substituteInPlace CMakeLists.txt --replace 'project("DB Browser for SQLite")' 'project(sqlitebrowser)'
2425 '';
2526
27+ postInstall = ''
28+ wrapQtProgram $out/bin/sqlitebrowser
29+ '';
2630
2731 meta = with stdenv.lib; {
2832 description = "DB Browser for SQLite";