New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darwin gtk2/pygtk quartz backend #21382
Conversation
Regarding the binaries I've tested |
92d8be4
to
f2a44b4
Compare
I've done some more experiments, it appears to me as if ApplicationServices should go into the propagatedBuildInputs of cairo. |
This breaks
You may need to package some extra libraries (https://github.com/rhult/ige-mac-integration). |
Uh, it might cause a few more issues like that I guess. I'll try to add ige-mac-integration and make things work. |
@vbgl think I got the gtksourceview issue figured out. Do you have any suggestions how I could best check how much this change might affect other packages? |
Indeed, |
@johbo nox-review and #19045 (comment) |
Hmm, it seems that all gtk2 based applications will suffer from #12346 until we get that sorted. I wonder if it would be better to make this gtk2 change opt-in and build by default for X11 until that's solved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good! It probably should be merged into staging first though.
Once this gets into master I can work on merging #20658 again.
gettext]; | ||
|
||
patches = optionals stdenv.isDarwin [ | ||
./0001-Change-IgeMacIntegration-to-GtkOSXApplication.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use fetchpatch for these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint, was not yet aware of it. I'll try to use it for both patches.
@@ -1,5 +1,5 @@ | |||
{ lib, stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, pango, cairo, libxml2, libgsf | |||
, bzip2, libcroco, libintlOrEmpty | |||
, bzip2, libcroco, libintlOrEmpty, darwin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed.
This helps so that fonts are properly rendered in gtk when used with the backend "quartz".
Had to add this so that it was able to parse the headers from the frameworks.
61fc9d7
to
ade978d
Compare
I'll rebase this quickly |
ade978d
to
bbaf7fe
Compare
Noticed that it caused depending packages to fail, like librsvg, imagemagiv, graphviz.
Had to pick two commits as patches from the repository which update the dependency ige-mac-integration to gtk-mac-integration.
bbaf7fe
to
f025d2c
Compare
cc @LnL7 @copumpkin |
Looks like about ~1400 packages will rebuild, I think that's still ok to do on master. |
Motivation for this change
I wanted to use a pygtk based application on darwin and noticed that it relied on the X11 backend of gtk which leads to trouble in multi screen setups (lost windows out of screen). Using the quartz backend also leads to a nicer display of the applications.
This Pull Request adjust GTK2 based on the work from #20658. I aimed to keep the changes to the GTK2 Derivation as close as possible to the other PR. The main change is that I added the CoreText dependencies to cairo and pango, so that fonts are actually visible.
Due to #12346 starting the applications still needs a twist by using something like
DYLD_FRAMEWORK_PATH=/System/Library/Frameworks
.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)