1{ stdenv, fetchFromGitHub, cmake, qt4, qscintilla }:
2
3stdenv.mkDerivation rec {
4 name = "sqliteman-${version}";
5 version = "1.2.0";
6
7 src = fetchFromGitHub {
8 repo = "sqliteman";
9 owner = "pvanek";
10 rev = version;
11 sha256 = "1blzyh1646955d580f71slgdvz0nqx0qacryx0jc9w02yrag17cs";
12 };
13
14 buildInputs = [ cmake qt4 qscintilla ];
15
16 prePatch = ''
17 sed -i 's,m_file(0),m_file(QString()),' Sqliteman/sqliteman/main.cpp
18 '';
19
20 preConfigure = ''
21 cd Sqliteman
22 sed -i 's,/usr/include/Qsci,${qscintilla}/include/Qsci,' cmake/modules/FindQScintilla.cmake
23 sed -i 's,PATHS ''${QT_LIBRARY_DIR},PATHS ${qscintilla}/libs,' cmake/modules/FindQScintilla.cmake
24 '';
25
26 meta = with stdenv.lib; {
27 description = "A simple but powerful Sqlite3 GUI database manager";
28 homepage = http://sqliteman.yarpen.cz/;
29 license = licenses.gpl2Plus;
30 platforms = platforms.linux;
31 maintainers = [ maintainers.eikek ];
32 };
33}