-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Is it possible to cross compile for a custom target? #66
Labels
enhancement
New feature or request
Comments
I'm ot familiar with nixpkgs's cross compiling, but this compiles this is based on example "cross compiling with naersk", a different linker didn't seem to be needed when im on x86_64-unknown-linux so I removed the change {
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
naersk = {
url = "github:nmattia/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, fenix, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: {
defaultPackage =
let
pkgs = nixpkgs.legacyPackages.${system};
target = "x86_64-fortanix-unknown-sgx";
toolchain = with fenix.packages.${system};
combine [
minimal.rustc
minimal.cargo
targets.${target}.latest.rust-std
];
in
(naersk.lib.${system}.override {
cargo = toolchain;
rustc = toolchain;
}).buildPackage {
src = ./.;
CARGO_BUILD_TARGET = target;
};
});
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, wondering if it's possible to specify a target that is custom, similar to what is mentioned in https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#cross-compilation-cross-compilation:
In case that can help, the target I'm interested in is
x86_64-fortanix-unknown-sgx
fenix/data/nightly.json
Line 1693 in 1a1694c
The text was updated successfully, but these errors were encountered: