1{ lib, stdenv, fetchFromGitHub, wxGTK, wxsqlite3, sqlite }:
2
3stdenv.mkDerivation rec {
4 pname = "wxsqliteplus";
5 version = "0.3.6";
6
7 src = fetchFromGitHub {
8 owner = "guanlisheng";
9 repo = "wxsqliteplus";
10 rev = "v${version}";
11 sha256 = "0mgfq813pli56mar7pdxlhwjf5k10j196rs3jd0nc8b6dkzkzlnf";
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 install -D wxsqliteplus $out/bin/wxsqliteplus
28 '';
29
30 meta = with lib; {
31 homepage = "https://github.com/guanlisheng/wxsqliteplus";
32 description = "A simple SQLite database browser built with wxWidgets";
33 platforms = platforms.unix;
34 maintainers = with maintainers; [ vrthra ];
35 license = licenses.gpl2;
36 };
37}