Merge pull request #177827 from malob/fix-wxGTK30-darwin

wxGTK30-gtk2,wxGTK30-gtk3: add missing buildInput on Darwin
This commit is contained in:
Anderson Torres 2022-06-17 02:29:51 -03:00 committed by GitHub
commit 20c0964ebf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 15 deletions

View File

@ -130,6 +130,7 @@ stdenv.mkDerivation rec {
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}
# TODO: a better way to organize the options

View File

@ -7,6 +7,8 @@
, pango
, pkg-config
, wxGTK
# darwin deps
, Cocoa
}:
stdenv.mkDerivation rec {
@ -28,7 +30,7 @@ stdenv.mkDerivation rec {
libexif
pango
wxGTK
];
] ++ lib.optional stdenv.isDarwin Cocoa;
meta = with lib; {
homepage = "http://wxsvg.sourceforge.net/";
@ -37,9 +39,8 @@ stdenv.mkDerivation rec {
wxSVG is C++ library to create, manipulate and render Scalable Vector
Graphics (SVG) files with the wxWidgets toolkit.
'';
license = with licenses; gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = wxGTK.meta.platforms;
broken = stdenv.isDarwin;
license = licenses.gpl2Plus;
maintainers = [ maintainers.AndersonTorres ];
inherit (wxGTK.meta) platforms;
};
}

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, wxGTK, wxsqlite3, sqlite }:
{ lib, stdenv, fetchFromGitHub, wxGTK, wxsqlite3, sqlite, Cocoa, setfile }:
stdenv.mkDerivation rec {
pname = "wxsqliteplus";
@ -11,27 +11,32 @@ stdenv.mkDerivation rec {
sha256 = "0mgfq813pli56mar7pdxlhwjf5k10j196rs3jd0nc8b6dkzkzlnf";
};
buildInputs = [ wxGTK wxsqlite3 sqlite ];
buildInputs = [ wxGTK wxsqlite3 sqlite ] ++ lib.optional stdenv.isDarwin Cocoa;
makeFlags = [
"LDFLAGS=-L${wxsqlite3}/lib"
] ++ lib.optionals stdenv.isDarwin [
"SETFILE=${setfile}/bin/SetFile"
];
preBuild = ''
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|-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 = ''
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; {
homepage = "https://github.com/guanlisheng/wxsqliteplus";
description = "A simple SQLite database browser built with wxWidgets";
platforms = platforms.unix;
maintainers = with maintainers; [ vrthra ];
homepage = "https://github.com/guanlisheng/wxsqliteplus";
license = licenses.gpl2;
maintainers = [ maintainers.vrthra ];
platforms = platforms.unix;
};
}

View File

@ -18,6 +18,7 @@
, withGtk2 ? true
, withWebKit ? false, webkitgtk
, AGL
, AVFoundation
, Carbon
, Cocoa
, Kernel
@ -57,6 +58,7 @@ stdenv.mkDerivation rec {
++ lib.optional withMesa libGLU
++ lib.optional withWebKit webkitgtk
++ lib.optionals stdenv.isDarwin [
AVFoundation
Carbon
Cocoa
Kernel
@ -130,7 +132,6 @@ stdenv.mkDerivation rec {
license = licenses.wxWindows;
maintainers = with maintainers; [ ];
platforms = platforms.linux ++ platforms.darwin;
badPlatforms = [ "x86_64-darwin" ];
};
passthru = {

View File

@ -80,6 +80,6 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ ];
platforms = platforms.unix;
# cmake fails: Cannot specify link libraries for target "wxWidgets::ADV" which is not built by this project.
broken = enableDaemon;
broken = enableDaemon || stdenv.isDarwin;
};
}

View File

@ -21218,7 +21218,7 @@ with pkgs;
wxGTK30 = callPackage ../development/libraries/wxwidgets/wxGTK30.nix {
withGtk2 = true;
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit;
inherit (darwin.apple_sdk.frameworks) AGL AVFoundation Carbon Cocoa Kernel QTKit;
};
wxGTK30-gtk2 = wxGTK30.override { withGtk2 = true; };
wxGTK30-gtk3 = wxGTK30.override { withGtk2 = false; };
@ -21237,6 +21237,7 @@ with pkgs;
wxSVG = callPackage ../development/libraries/wxSVG {
wxGTK = wxGTK30-gtk3;
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
wtk = callPackage ../development/libraries/wtk { };
@ -35046,6 +35047,8 @@ with pkgs;
wxsqliteplus = callPackage ../development/libraries/wxsqliteplus {
wxGTK = wxGTK30;
inherit (darwin.apple_sdk.frameworks) Cocoa;
inherit (darwin.stubs) setfile;
};
x11idle = callPackage ../tools/misc/x11idle {};