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

iterm2: 3.0.14 -> 3.3.9 & fix build #81443

Merged
merged 2 commits into from Mar 3, 2020
Merged

iterm2: 3.0.14 -> 3.3.9 & fix build #81443

merged 2 commits into from Mar 3, 2020

Conversation

tricktron
Copy link
Member

Motivation for this change

Fixes #80647 and builds iterm2 impurely. See this pull request for the reasons.

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.

@ersinakinci
Copy link
Contributor

Just tested on macOS 10.15 and it works! I left two questions in the review, however:

  1. What is build-use-chroot and where is it documented?
  2. What is sandboxProfile and where is it documented?

These may help me fix other macOS derivations.

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.

Looks good, alltho I'm not sure if it's really worth maintaining impure packages in nixpkgs.

@tricktron
Copy link
Member Author

tricktron commented Mar 1, 2020

Looks good, alltho I'm not sure if it's really worth maintaining impure packages in nixpkgs.

@LnL7 Yeah I agree. I first tried to build it using the xcbuildHook with xcbuild but it always failed because it couldn't find the headers of apr-1/base64.h. I tried to include them using export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.aprutil.dev}/include/apr-1 and some other combinations of using NIX_CFLAGS_COMPILE but it didn't work and I gave up trying to build it purely.

As it is a pretty popular app on MacOS I still fixed it while at it.

@tricktron
Copy link
Member Author

Just tested on macOS 10.15 and it works! I left two questions in the review, however:

  1. What is build-use-chroot and where is it documented?
  2. What is sandboxProfile and where is it documented?

These may help me fix other macOS derivations.

Creating pure derivations using sandboxing is definitely difficult for apps relying on Xcode but the main issue with Catalina was that:

Nix has its default home directory under /private/var/empty. As a result, Xcode sets the build directory relative to this home directory. Since Mojave the user has no write permission in that directory and the build fails.

See the mentioned pull request here on how you can solve that issue using the -derivedDataPath flag.

@ersinakinci
Copy link
Contributor

Aha! Nice. Thanks for the explanations and the link to your other PR, @tricktron.

@LnL7 LnL7 merged commit 4c945ee into NixOS:master Mar 3, 2020
@tricktron tricktron deleted the iterm2-fix branch March 4, 2020 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

macOS Catalina source builds fail (for example, iterm2)
3 participants