-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Fix Synergy building on macOS #43523
Conversation
4f0ef0a
to
8a56a1a
Compare
@GrahamcOfBorg build synergy |
@@ -14,17 +12,30 @@ stdenv.mkDerivation rec { | |||
sha256 = "0ksgr9hkf09h54572p7k7b9zkfhcdb2g2d5x7ixxn028y8i3jyp3"; | |||
}; | |||
|
|||
patches = [ ./openssl-1.1.patch ]; | |||
patches = [./openssl-1.1.patch ./update_gtest_gmock.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.
Please use fetchpatch
to avoid checking in patches to nixpkgs.
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 this is a patch I made for Nixpkgs, where should I host it?
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.
My bad. I didn't notice these patches were made by you.
I assumed they were from upstream.
|
||
patch_gcc6 = fetchpatch { | ||
url = https://raw.githubusercontent.com/gentoo/gentoo/20e2bff3697ebf5f291e9907b34aae3074a36b53/dev-cpp/gmock/files/gmock-1.7.0-gcc6.patch; | ||
sha256 = "0j3f381x1lf8qci9pfv6mliggl8qs2w05v5lw3rs3gn7aibg174d"; | ||
}; | ||
|
||
gmock_zip = fetchurl { |
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 like this. How are these files supposed to be maintained and updated?
If this is just a temporary measure and expected to be removed in the next release please add a comment stating so.
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.
Added a comment noting that it was only related to this version of Synergy.
sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \ | ||
set(HAVE_X11_EXTENSIONS_XRANDR_H true) | ||
' CMakeLists.txt | ||
''; | ||
|
||
cmakeFlags = [ "-DOSX_TARGET_MAJOR=10" "-DOSX_TARGET_MINOR=7" ]; |
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 cmake flags should only be applied on 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.
Fixed.
cc @aszlig |
@Enzime To use @GrahamcOfBorg you need to be in the whitelist: https://github.com/NixOS/ofborg#trusted-users-vs-known-users |
8a56a1a
to
a40c2d3
Compare
sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \ | ||
set(HAVE_X11_EXTENSIONS_XRANDR_H true) | ||
' CMakeLists.txt | ||
''; | ||
|
||
cmakeFlags = lib.optionals stdenv.isDarwin [ "-DOSX_TARGET_MAJOR=10" "-DOSX_TARGET_MINOR=7" ]; |
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.
What's this for? We already set MACOSX_DEPLOYMENT_TARGET in the stdenv.
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.
Synergy's CMakeLists.txt expects these variables, and doesn't infer from MACOSX_DEPLOYMENT_TARGET
.
cmake xlibsWrapper libX11 libXi libXtst libXrandr xinput curl openssl | ||
]; | ||
cmake curl openssl | ||
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; |
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.
nit: do this in with callPackage overrides in all-packages.nix
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.
Fixed.
Update gtest and gmock to fix clang compiler issues, as well as patch CMakeLists.txt in multiple places to fix other issues on macOS.
a40c2d3
to
fe69ee8
Compare
@GrahamcOfBorg build synergy |
Success on x86_64-linux (full log) Attempted: synergy Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: synergy Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: synergy Partial log (click to expand)
|
Update gtest and gmock to fix clang compiler issues, as well as patch CMakeLists.txt in multiple places to fix other issues on macOS.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)