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

mkDerivation: use Generic as system name for Redox in cmakeFlags #95129

Merged
merged 1 commit into from Aug 19, 2020

Conversation

aaronjanse
Copy link
Member

@aaronjanse aaronjanse commented Aug 11, 2020

Motivation for this change

cmake does not recognize Redox, but builds still work if the system name "Generic" is used. As far as I know, there are two ways to fix this. I chose the second.

  1. Send a patch to upstream cmake. If accepted, Nixpkgs would eventually need to update to a new cmake, causing a massive rebuild.
  2. Refer to Redox as "Generic" in mkDerivation's cmakeFlags. Note that this must be done in mkDerivation because it forcefully appends cmakeFlags with the system name. This avoids a big rebuild, and allows the Nix expressions to match the build scripts Redox is currently using to package things.
Things done

Use "Generic" as the system name for Redox in cmakeFlags. My understanding is that this shouldn't cause a mass rebuild for anything but Redox.

This change is required for cross-compiling llvm to Redox, which is a dependency needed to build the Redox operating system.

  • 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.

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.

None yet

2 participants