wxsqliteplus: fix Darwin build
This commit is contained in:
parent
abff737e36
commit
135836b31b
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, wxGTK, wxsqlite3, sqlite }:
|
{ lib, stdenv, fetchFromGitHub, wxGTK, wxsqlite3, sqlite, Cocoa, setfile }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wxsqliteplus";
|
pname = "wxsqliteplus";
|
||||||
|
@ -11,27 +11,32 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0mgfq813pli56mar7pdxlhwjf5k10j196rs3jd0nc8b6dkzkzlnf";
|
sha256 = "0mgfq813pli56mar7pdxlhwjf5k10j196rs3jd0nc8b6dkzkzlnf";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ wxGTK wxsqlite3 sqlite ];
|
buildInputs = [ wxGTK wxsqlite3 sqlite ] ++ lib.optional stdenv.isDarwin Cocoa;
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"LDFLAGS=-L${wxsqlite3}/lib"
|
"LDFLAGS=-L${wxsqlite3}/lib"
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
"SETFILE=${setfile}/bin/SetFile"
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
sed -ie 's|all: $(LIBPREFIX)wxsqlite$(LIBEXT)|all: |g' Makefile
|
sed -ie 's|all: $(LIBPREFIX)wxsqlite$(LIBEXT)|all: |g' Makefile
|
||||||
sed -ie 's|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT)|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) |g' Makefile
|
sed -ie 's|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT)|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) |g' Makefile
|
||||||
sed -ie 's|-lwxsqlite |-lwxcode_gtk2u_wxsqlite3-3.0 |g' Makefile
|
sed -ie 's|-lwxsqlite |-lwxcode_${if stdenv.isDarwin then "osx_cocoau_wxsqlite3-3.0.0" else "gtk2u_wxsqlite3-3.0"} |g' Makefile
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -D wxsqliteplus $out/bin/wxsqliteplus
|
install -D ${lib.optionalString stdenv.isDarwin "wxsqliteplus.app/Contents/MacOS/"}wxsqliteplus $out/bin/wxsqliteplus
|
||||||
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
mv wxsqliteplus.app $out/Applications/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/guanlisheng/wxsqliteplus";
|
|
||||||
description = "A simple SQLite database browser built with wxWidgets";
|
description = "A simple SQLite database browser built with wxWidgets";
|
||||||
platforms = platforms.unix;
|
homepage = "https://github.com/guanlisheng/wxsqliteplus";
|
||||||
maintainers = with maintainers; [ vrthra ];
|
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
maintainers = [ maintainers.vrthra ];
|
||||||
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -35053,6 +35053,8 @@ with pkgs;
|
||||||
|
|
||||||
wxsqliteplus = callPackage ../development/libraries/wxsqliteplus {
|
wxsqliteplus = callPackage ../development/libraries/wxsqliteplus {
|
||||||
wxGTK = wxGTK30;
|
wxGTK = wxGTK30;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||||
|
inherit (darwin.stubs) setfile;
|
||||||
};
|
};
|
||||||
|
|
||||||
x11idle = callPackage ../tools/misc/x11idle {};
|
x11idle = callPackage ../tools/misc/x11idle {};
|
||||||
|
|
Loading…
Reference in a new issue