-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
gpgme: fix build on macOS #22848
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
gpgme: fix build on macOS #22848
Conversation
@loskutov can you also test with |
@davidak it seems to be broken on macOS :/ |
@loskutov also with other packages? |
@LnL7 could you take a look too? |
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 forgot about this because this needs xcode and the machine I usually build things with only has nix installed.
The build looks good.
@@ -30,6 +30,9 @@ stdenv.mkDerivation rec { | |||
NIX_CFLAGS_COMPILE = | |||
with stdenv; lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; | |||
|
|||
AM_CXXFLAGS = | |||
with stdenv; lib.optional (isDarwin) "-D_POSIX_C_SOURCE=200809L"; |
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.
Does this have to be conditional or will this get propagated to dependencies? The with
is also a bit overkill IMHO.
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.
with
usage follows the pattern of the previous line; as for being conditional, I’m not sure: on one hand, it looks like strdup
is only specified to be defined if one of the several macros is defined; on the other hand—it used to work, so why fix what’s not broken on other platforms?
Motivation for this change
Fix build on macOS (it complained on
strdup
being undefined)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/
)