1{ stdenv, fetchFromGitHub, wxGTK, wxsqlite3, sqlite }:
2
3stdenv.mkDerivation rec {
4 name = "wxsqliteplus-${version}";
5 version = "0.3.6";
6
7 src = fetchFromGitHub {
8 owner = "guanlisheng";
9 repo = "wxsqliteplus";
10 rev = "v${version}";
11 sha1 = "yr9ysviv4hbrxn900z1wz8j32frimvx1";
12 };
13
14 buildInputs = [ wxGTK wxsqlite3 sqlite ];
15
16 makeFlags = [
17 "LDFLAGS=-L${wxsqlite3}/lib"
18 ];
19
20 preBuild = ''
21 sed -ie 's|all: $(LIBPREFIX)wxsqlite$(LIBEXT)|all: |g' Makefile
22 sed -ie 's|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT)|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) |g' Makefile
23 sed -ie 's|-lwxsqlite |-lwxcode_gtk2u_wxsqlite3-3.0 |g' Makefile
24 '';
25
26 installPhase = ''
27 mkdir -p $out/bin
28 cp wxsqliteplus $out/bin/
29 '';
30
31 meta = with stdenv.lib; {
32 homepage = http://guanlisheng.com/;
33 description = "A simple SQLite database browser built with wxWidgets";
34 platforms = platforms.unix;
35 maintainers = with maintainers; [ vrthra ];
36 license = licenses.gpl2;
37 };
38}