nixpkgs/pkgs/build-support/rust
Adam Joseph 8682bd0a81 build-support/rust: toTargetArch: strip off endianness
`toTargetArch` in `pkgs/build-support/rust/lib/default.nix` is used to
set `CARGO_CFG_TARGET_ARCH`.  This environment variable is supposed to
be the `<arch>` portion of an LLVM-style platform name:

```
<arch><sub>-<kernel>-<libc><abi>
```

Note that the pointer-width (the "64" in "x86_64" and "mips64") is
part of `<arch>`, but the endianness (the `_be` in `aarch64_be`) is
*not*.

Unfortunately at the moment nixpkgs' parsed `cpuType` has no way to
query for the three subparts (name, pointer-width, and
subarch/endianness), nor any way to ask for just the first two parts.

For now, this commit simply fixes the problem in the two cases that
matter: `mips64el` and `powerpc64le`, which I believe are the only two
platforms supported by both rust and nixpkgs which have a
"subarchitecture".
2022-08-22 02:27:06 -07:00
..
build-rust-crate buildRustCrate: Add support for standard library deps 2022-08-01 15:34:49 -04:00
build-rust-package buildRustPackage: add missing attr to remove 2022-05-28 21:06:27 +03:00
fetch-cargo-tarball fetchCargoTarball: allow adding nativeBuildInputs 2022-05-28 21:55:39 +03:00
hooks maturin: 0.12.9 -> 0.13.0 2022-07-21 22:35:32 +02:00
lib build-support/rust: toTargetArch: strip off endianness 2022-08-22 02:27:06 -07:00
sysroot build-support/rust/sysroot/src: Use dont* instead of phase list 2021-11-08 21:38:58 +00:00
test/import-cargo-lock rust/import-cargo-lock: hopefully make nested crate test work on macos 2021-10-25 01:11:45 +02:00
carnix.nix
crates-io.nix
default-crate-overrides.nix default-crate-overrides.nix: add libevdev for evdev-rs 2022-08-14 21:20:55 -07:00
fetchcargo-default-config.toml
fetchcrate.nix
import-cargo-lock.nix rust: fix importCargoLock for repositories without toplevel Cargo.toml 2022-03-17 00:15:56 -04:00