Skip to content
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

Merged
merged 1 commit into from Mar 3, 2017
Merged

gpgme: fix build on macOS #22848

merged 1 commit into from Mar 3, 2017

Conversation

loskutov
Copy link
Contributor

Motivation for this change

Fix build on macOS (it complained on strdup being undefined)

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@loskutov, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Fuuzetsu, @edolstra and @aszlig to be potential reviewers.

@LnL7 LnL7 added the 6.topic: darwin Running or building packages on Darwin label Feb 15, 2017
@davidak
Copy link
Member

davidak commented Feb 17, 2017

@loskutov can you also test with build-use-sandbox?

@loskutov
Copy link
Contributor Author

@davidak it seems to be broken on macOS :/

@davidak
Copy link
Member

davidak commented Feb 17, 2017

@loskutov also with other packages?

@loskutov
Copy link
Contributor Author

@loskutov
Copy link
Contributor Author

loskutov commented Feb 25, 2017

@LnL7 could you take a look too?

Copy link
Member

@LnL7 LnL7 left a 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";
Copy link
Member

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.

Copy link
Contributor Author

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?

@grahamc grahamc merged commit 75bc511 into NixOS:master Mar 3, 2017
@loskutov loskutov deleted the gpgme-macos-fix branch April 14, 2017 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants