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

cargo-c: fix cross and static #198410

Closed
wants to merge 8 commits into from
Closed

cargo-c: fix cross and static #198410

wants to merge 8 commits into from

Conversation

yu-re-ka
Copy link
Contributor

@yu-re-ka yu-re-ka commented Oct 29, 2022

Description of changes

This depends on several PRs, and is also useful for testing the changes made in those:

#198309
#198311
#198409

With this branch, I successfully built the following derivations:

-A fd \
-A cargo-c \
-A pkgsMusl.fd \
-A pkgsMusl.cargo-c \
-A pkgsStatic.fd \
-A pkgsStatic.cargo-c \
-A pkgsCross.musl64.fd \
-A pkgsCross.musl64.cargo \
-A pkgsCross.musl64.cargo-c \
-A pkgsCross.aarch64-multiplatform.fd \
-A pkgsCross.aarch64-multiplatform.cargo \
-A pkgsCross.aarch64-multiplatform.cargo-c \
-A pkgsCross.aarch64-multiplatform.pkgsStatic.fd \
-A pkgsCross.aarch64-multiplatform.pkgsStatic.cargo-c \
-A pkgsMusl.pkgsCross.gnu64.fd \
-A pkgsMusl.pkgsCross.gnu64.cargo \
-A pkgsMusl.pkgsCross.gnu64.cargo-c \
-A pkgsMusl.pkgsCross.aarch64-multiplatform.fd \
-A pkgsMusl.pkgsCross.aarch64-multiplatform.cargo \
-A pkgsMusl.pkgsCross.aarch64-multiplatform.cargo-c \
-A pkgsMusl.pkgsCross.aarch64-multiplatform.pkgsStatic.fd \
-A pkgsMusl.pkgsCross.aarch64-multiplatform.pkgsStatic.cargo-c
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.11 Release Notes (or backporting 22.05 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.

yu-re-ka and others added 8 commits October 28, 2022 20:16
By moving this from the rustc derivation, the necessary environment
variables will also be set for other Rust packages that need them,
like cargo.
It's not possible to run installCheckPhase when cross-compiling, so we
have to tack this on to postInstall instead.
This fixes cross-compilation.
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.

2 participants