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

haxe_4_1,haxe_4_2: fix build on Darwin #119973

Merged
merged 1 commit into from Apr 20, 2021

Conversation

OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Apr 20, 2021

Motivation for this change

Haxe 4.1 and 4.2 require Security on Darwin, noticed it earlier today while trying to use them on my machine for the first time.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Apr 20, 2021
@@ -31,7 +31,7 @@ let
inherit version;

buildInputs = [ zlib pcre neko ]
++ lib.optional (lib.versionAtLeast version "4.1") [ mbedtls ]
++ lib.optionals (lib.versionAtLeast version "4.1") ([ mbedtls ] ++ lib.optional stdenv.hostPlatform.isDarwin [ Security ])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bit more readable this way. Also: Are you sure this issue doesn't affect 4.0 or any previous version?

Suggested change
++ lib.optionals (lib.versionAtLeast version "4.1") ([ mbedtls ] ++ lib.optional stdenv.hostPlatform.isDarwin [ Security ])
++ lib.optionals (lib.versionAtLeast version "4.1") [ mbedtls ]
++ lib.optionals (lib.versionAtLeast version "4.1" && stdenv.hostPlatform.isDarwin) [ Security ]

Also using just stdenv.isDarwin is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: Are you sure this issue doesn't affect 4.0 or any previous version?

Tested all packaged versions. 3.x and 4.0 compile fine, only 4.1 and 4.2 error out.

Bildschirmfoto von 2021-04-20 22-11-11

@sternenseemann sternenseemann merged commit 14b5ddf into NixOS:master Apr 20, 2021
@sternenseemann
Copy link
Member

Thank you!

@OPNA2608 OPNA2608 deleted the fix/haxe_darwin/21.05 branch September 27, 2022 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants