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
haskellPackages.apecs-physics: fix build on darwin #107395
haskellPackages.apecs-physics: fix build on darwin #107395
Conversation
cc @siraben for testing |
Result of EDIT: seems like |
Suggest removing broken label. diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index f172a3d4247..8eb07a0dfbe 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -30736,7 +30736,6 @@ self: {
description = "Simple gloss renderer for apecs";
license = stdenv.lib.licenses.bsd3;
hydraPlatforms = stdenv.lib.platforms.none;
- broken = true;
}) {};
"apecs-physics" = callPackage
@@ -30754,7 +30753,6 @@ self: {
description = "2D physics for apecs";
license = stdenv.lib.licenses.bsd3;
hydraPlatforms = stdenv.lib.platforms.none;
- broken = true;
}) {};
"apecs-physics-gloss" = callPackage
@@ -30767,7 +30765,6 @@ self: {
description = "Gloss rendering for apecs-physics";
license = stdenv.lib.licenses.bsd3;
hydraPlatforms = stdenv.lib.platforms.none;
- broken = true;
}) {};
"apecs-stm" = callPackage
|
No, this is done automatically during the next haskellPackage update. The process is described here. To test the change, you'll have to checkout the branch, build and set NIXPKGS_ALLOW_BROKEN=1 temporarily. |
I see, I wasn't aware of that! Thanks! |
Build fails on darwin
|
This build failure is at least unrelated to the change, seems like it is caused by this inclusion https://github.com/slembcke/Chipmunk2D/blob/edf83e5603c5a0a104996bd816fca6d3facedd6a/include/chipmunk/chipmunk_types.h#L44-L46. I tried adding |
Builds succeed.
|
# Add ApplicationServices on darwin | ||
# Patch can be removed if https://github.com/jonascarpay/apecs/pull/77 is resolved | ||
apecs-physics = | ||
let | ||
sysDeps = pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.ApplicationServices; | ||
in addPkgconfigDepends (appendPatch super.apecs-physics (pkgs.fetchpatch { | ||
url = "https://github.com/jonascarpay/apecs/pull/77/commits/24975a4e689fb9920168bbbcb451d8fb8a16abdb.patch"; | ||
sha256 = "0w7ivv9wgrkba9psbc4920y0apg5cpyz9fwwzizfgqhy0gz6ss7y"; | ||
stripLen = 1; | ||
})) sysDeps; |
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.
Ping @jonascarpay.
Does this change look okay to you, or does it make more sense just to wait for you to release a new version of apecs-physics
to Hackage?
@cdepillabout Yeah, I think this is best fixed properly upstream. I'll push a new version today. |
2d6d7f4
to
cb44da7
Compare
To fix the darwin build, 96376c6 should be cherry-picked or merged either way though. |
901e618
to
54e44bf
Compare
@sternenseemann Why is that the case? The stock Chipmunk2D doesn't have that. Is there something I can do about that? |
@jonascarpay Judging from this comment, seems like the normal Chipmunk hasn't been really tested on macOS:
As far as I understand in On darwin the build fails because |
ahh I see, thanks, I overlooked that line
Yeah, just asking for my own edification. |
I just pushed 0.4.5 to hackage, which includes the |
dea822a
to
9679699
Compare
@cdepillabout is it alright to just update the pin to 0.4.5 for the next haskell-update like in 96796994bf684689bcc6997d65d91d1368c17049? |
I think this should be okay, but let's confirm with @maralorn. @maralorn, a short explanation is that |
Build still succeeds on darwin
|
(Should be broken on linux until the update is actually performed though) |
Huh, @cdepillabout, the problem is that those pins are automatically generated from stackage-nightly. So I am pretty sure this bump would just be reverted if it hasn‘t happened in stackage-nightly. The next time peti updates the stackage pin. I think normally we do this by using a "apecs-physics = super.apecs-physics_0_4_5" override. I am not sure if there is a way to override the stackage version in the yaml file. |
Maybe it's a better idea to merge the darwin fix only which can be done right now and I check after the next haskell-update if we have to override |
@sternenseemann That sounds like an easy thing to do right away if you're willing to update this PR again. |
@cdepillabout Yeah, no problem!
|
hackage2nix is usually run once a day, but |
@cdepillabout okay, then I'll wait till the new stackage-nightly is out. Should I force push to drop the second commit then, so you can merge the darwin fix? |
9679699
to
96376c6
Compare
@sternenseemann This looks good, thanks. Also, I checked the stackage nightly releases, and it looks like they completely stopped two weeks ago or so. Don't know what's up: https://www.stackage.org/snapshots |
Motivation for this change
apecs-physics was broken by glibc 2.32 which removed sys/sysctl.h. Since
sysctl is only used on macOS in the offending source file, we patch it
to only include the header on macOS, fixing the build on linux.
Resolves #107358.
Testing this fix on darwin may be a good idea.
apecs-stm is broken for an unrelated reason, it seems.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)