Skip to content

kitty: fix aarch64-darwin build#153450

Closed
cideM wants to merge 1 commit intoNixOS:masterfrom
cideM:fix-kitty-darwin
Closed

kitty: fix aarch64-darwin build#153450
cideM wants to merge 1 commit intoNixOS:masterfrom
cideM:fix-kitty-darwin

Conversation

@cideM
Copy link
Contributor

@cideM cideM commented Jan 4, 2022

Motivation for this change

I don't want to steal someone else's work but I was about to create a PR to bump kitty to 0.24.0 but then I was reminded that it doesn't even build on my aarch64-darwin machine. But someone else had already fixed that, the PR was just never merged and eventually closed by the creator. I tried the fix on my machine and it works, so I thought I'd create a new PR for it. Feel free to close mine and re-open yours or I can also make you co-author, or main author (if that's possible) of the commit. @bobrik

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jan 4, 2022
@ofborg ofborg bot requested review from Luflosi, rvolosatovs and tex January 4, 2022 08:26
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jan 4, 2022
hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";

preBuild = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) ''
MACOSX_DEPLOYMENT_TARGET=10.16
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 has any effect? You are not using export here so it would be only accessible to bash but no child processes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All I can say is that without it the build doesn't work on my aarch64-darwin machine and there are other packages that use the same approach in preBuild and preConfigure. I don't know if the fact that this works is accidental or not.

@Luflosi
Copy link
Contributor

Luflosi commented Jan 4, 2022

There is a different PR that also aims to fix this but in a different way: #137512. It was was also never merged.

@cideM
Copy link
Contributor Author

cideM commented Jan 4, 2022

I actually saw this PR but I must've forgotten about it since then. If the other PR does it in a proper way I will happily close this one.

@Luflosi
Copy link
Contributor

Luflosi commented Jan 5, 2022

I think the other PR is more future-proof. I don't know why it's not being merged though.

@cideM
Copy link
Contributor Author

cideM commented Jan 5, 2022

I'll close this one again then

@cideM cideM closed this Jan 5, 2022
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 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants