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
Fixes for macos #24700
Fixes for macos #24700
Conversation
@hamishmack, thanks for your PR! By analyzing the history of the files in this pull request, we identified @groxxda, @aszlig and @bendlas to be potential reviewers. |
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.
Thx for the great work, i've proposed some enhnacements.
patch -p0 < ${./PR-153138.patch} | ||
patch -p0 < ${./PR-157554.patch} | ||
patch -p0 < ${./PR-157574.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.
Put these in patches
and do not use the patch util manually.
Source/WebKit2/CMakeFiles/WebProcess.dir/link.txt | ||
sed -i "s|\.\./\.\./lib/libWTFGTK\.a|-Wl,-all_load ../../lib/libWTFGTK.a|" \ | ||
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/link.txt | ||
''; |
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.
If possible try to use of substituteInPlace
@@ -37,24 +61,40 @@ stdenv.mkDerivation rec { | |||
cmakeFlags = [ | |||
"-DPORT=GTK" | |||
"-DUSE_LIBHYPHEN=0" | |||
"-DENABLE_GLES2=ON" | |||
]; | |||
] ++ (if stdenv.isDarwin then [ |
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.
Use of stdenv.lib.optionals (stdenv.isDarwin) [...]
is a much nicer syntax that avoids parenthesis nesting and plays well with additions for other platforms.
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.
Might be an exception here, because of the else
branch. What would be the other platform? (!stdenv.isDarwin)?
libxml2 libsecret libxslt harfbuzz libpthreadstubs libtasn1 p11_kit | ||
gst-plugins-base libxkbcommon epoxy at_spi2_core | ||
] ++ optional enableGeoLocation geoclue2 | ||
++ (with xlibs; [ libXdmcp libXt libXtst ]); | ||
++ (with xlibs; [ libXdmcp libXt libXtst ]) | ||
++ (if stdenv.isDarwin then [ libedit readline mesa ] else [ wayland ]); |
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.
As above use stdenv.lib.optionals
and make the platform explicit for wayland
.
d835991
to
90f4361
Compare
Ok I think I have the enhancements right now. @Mic92 I used |
patches = [ ./finding-harfbuzz-icu.patch ]; | ||
patches = [ ./finding-harfbuzz-icu.patch ] | ||
++ optionals stdenv.isDarwin [ | ||
./PR-152650-2.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.
I don't think we can fetch them directly from macports if that is what you were suggesting. I had to modify them slightly. The macports patches are designed to work with patch -p0
. I had to add an extra directory to the paths to make them work with patches
in nix (90f4361#diff-7e2407d988a384c067352687b99c845e is the commit with that change).
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.
Alright
So if this gets merged I think we can probably close #14284 because it looks like it's roughly the same purpose. |
Also: make sure your commit messages meet the contributing guideles. |
90f4361
to
6530843
Compare
@matthewbauer I have merged the |
It's preferred to format the first like |
Includes the patches from macports and fixes an issue with the `otool -L` output that was causing g-ir-scanner to fail. The paths in the macports patches have been modified so that they will work with `patches` in nix (an extra directory level was added).
Add darwin to the list of supported platforms for gtksourceview.
6530843
to
f4d332e
Compare
Include a Gtk3 version of gtk-mac-integration. Add gobjectIntrospection to gtk-mac-integration. Use propagatedBuildInputs for gtk.
f4d332e
to
4d5ed18
Compare
I have moved the package names to the start of the commit messages. Split the request into three commits (one for each package). I also moved the |
Motivation for this change
Gets WebKitGTK+, GtkSourceView and gtk-mac-integration working on MacOS
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/
)