Commit Graph

612 Commits

Author SHA1 Message Date
jopejoe1
2e2c7f54fd treewide: hide more deprecated stuff if allowAliases is false 2024-11-27 20:51:46 +01:00
Masum Reza
76e7cb3fac
rustPlatform.fetchCargoVendor: init (#349360) 2024-11-16 09:30:53 +05:30
TomaSajt
37ce479c7b
buildRustPackage: add useFetchCargoVendor flag 2024-11-15 13:09:16 +01:00
TomaSajt
1911b1e399
rustPlatform.fetchCargoVendor: init 2024-11-11 15:52:54 +01:00
K900
46a1f3aa58 Merge remote-tracking branch 'origin/staging-next' into staging 2024-11-03 11:04:59 +03:00
Audrey Dutcher
7f179a1b12
rustc: do not force compilation with libunwind on FreeBSD
FreeBSD's unwind libs are named "libgcc" despite being llvm in origin
and come from the FreeBSD source tree.
2024-11-02 05:39:17 +00:00
Audrey Dutcher
88f09c87d3
rustc: fix cross compilation of LLVM with shared libs
The PR which fixed `useLLVM` native rustc builds (#320432)
also broke cross builds.

The C compiler it used to produce `llvmShared` and `llvmPackages`,
`llvmPackages.clangUseLLVM`, was built to run on the host
and create binaries for the target (`pkgsHostTarget`).
Instead, the compiler should be built to run on the build
machine and produce binaries for the host machine (`pkgsBuildHost`).

Replace the overridden compilers with ones from `pkgsBuildHost`

Co-Authored-By: Artemis Tosini <me@artem.ist>
2024-11-02 05:39:17 +00:00
Steven Keuchel
4026e88664
rustc: use 1.82.0 binary to bootstrap rustc 1.82.0
Change the bootstrap on all platforms to use a version of the upstream binary
that is equal to the version that is being built, instead of a binary of one
version prior. This is necessary for the 1.82.0 release because on some
platforms (https://github.com/rust-lang/rust/issues/129268) the 1.81.0 binary
can not build the 1.82.0 source. Furthermore, upstream reported that their
development process (now) usually involves building a release compiler with
itself and that "the Rust compiler must be able to build itself".
2024-10-31 14:14:48 +01:00
Alyssa Ross
c263e0b33b cargo,clippy,rustc,rustfmt: 1.81.0 -> 1.82.0 2024-10-18 10:13:12 +02:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
K900
d8a54461fc Merge remote-tracking branch 'origin/staging-next' into staging 2024-09-20 07:27:56 +03:00
Artturin
cd6ed2642c rustc: Correct enable-profiler linux check
remove the `isRedox` condition which was added because `stdenv.isLinux` uses `hostPlatform`, after specifying `targetPlatform` it's no longer necessary.
2024-09-19 19:15:25 +03:00
Manuel Mendez
17b3df2861 rust: Write to .cargo/config.toml instead of .cargo/config
Seeing the following new warnings pop up on stderr when cargo was bumped
to 1.78:

```
warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
```

which happens to break commitmsgfmt builds in nix (#320294).

closes #320294
2024-09-11 21:03:32 -04:00
Alyssa Ross
5f125d57c3 cargo,clippy,rustc,rustfmt: 1.80.1 -> 1.81.0
Fixes: CVE-2024-24576
2024-09-10 15:02:38 +02:00
Alyssa Ross
0852f8eb84
rustc: expose platform lists
Previously, it wasn't possible to access the list of platforms we can
build Rust programs for outside of buildRustPackage.  This was a
problem for packages that have optional Rust components, like
gstreamer or Meson, as there was no way to only build the Rust parts
for supported platforms.  Now it's possible to get that information
from rustc's passthru.
2024-09-03 17:47:27 +02:00
bl0v3
1827e1451b rust: add s390x platform 2024-09-02 15:34:42 +02:00
Alyssa Ross
ecba63d3e6 rustc: fix building with MinGW target
Building std requires dlltool for the target platform.
2024-08-25 17:25:00 +02:00
K900
27d4ae6645 rustc: 1.80.0 -> 1.80.1, add zlib dependency on Darwin 2024-08-09 10:29:38 +03:00
Theo Paris
30889c3463 cargo,clippy,rustc,rustfmt: 1.79.0 -> 1.80.0 2024-08-06 22:22:27 +02:00
Vladimír Čunát
d4720e9c1e
Merge branch 'staging-next' into staging
There was a nontrivial conflict in pkgs/stdenv/linux/bootstrap-tools*
(reorganizing code vs. modifying it)  I hope I really got it right.
2024-08-05 11:05:55 +02:00
Sigmanificient
63d05d989e pkgs/development: remove unused arguments 2024-08-03 17:18:20 +02:00
Tristan Ross
7cb636da67
rustc: wrap llvmPackages when using LLVM with callPackage 2024-07-28 22:53:46 -07:00
github-actions[bot]
09de87d288
Merge staging-next into staging 2024-07-26 06:01:50 +00:00
K900
1410c766c8 Merge remote-tracking branch 'origin/master' into staging-next 2024-07-26 08:41:08 +03:00
Silvan Mosberger
062ccd7ec2
Merge pull request #324633 from philiptaron/__attrsFailEvaluation/rust
rustPackages.buildRustPackages: allow one level of introspection before applying __attrsFailEvaluation
2024-07-26 01:59:31 +02:00
Tristan Ross
6a163e2a36
rustc: fix building with llvm (#320432) 2024-07-25 01:48:56 -04:00
Alyssa Ross
83aaf61836 cargo,clippy,rustc,rustfmt: 1.78.0 -> 1.79.0
For the first time, it seems that no new kernel patch is required!
2024-07-06 10:07:34 +02:00
Philip Taron
4122d072e5
rustPackages.buildRustPackages: allow one level of introspection before applying __attrsFailEvaluation 2024-07-04 11:40:40 -07:00
Vladimír Čunát
040c460262
Revert "rustc: avoid rebuild on linux right now"
This reverts commit 68538d36ce.
2024-07-01 09:26:16 +02:00
Vladimír Čunát
68538d36ce
rustc: avoid rebuild on linux right now 2024-07-01 07:32:23 +02:00
Robert Scott
4839263513 rustc: disable zerocallusedregs hardening flag on clang stdenv
to reverse breakage due to it not being supported by
clang when building for wasm32. really we should not be
using a wrapped compiler to build for wasm, but that's
a tangled knot..
2024-06-30 22:46:46 +01:00
Winter
2de1fd60fc
Revert "rust: Write config.toml not config" 2024-06-23 12:32:29 -04:00
Manuel Mendez
3f7663c1d7 rust: Write to .cargo/config.toml instead of .cargo/config
Seeing the following new warnings pop up on stderr when cargo was bumped
to 1.78:

```
warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
```

which happens to break commitmsgfmt builds in nix (#320294).

closes #320294
2024-06-19 14:56:51 -04:00
Alyssa Ross
b00f262516 Revert "rustc: disable wasm32 if some gcc options are set"
This reverts commits 6d0ba08b97,
723100d83b, and
bf13eca852.

The underlying issue has now been fixed, so we can re-enable
wasm32-unknown-unknown on all platforms.
2024-06-15 08:02:29 +02:00
github-actions[bot]
c8c2ff3b9b
Merge staging-next into staging 2024-06-10 00:02:49 +00:00
Alyssa Ross
3df6bb2c85
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/applications/blockchains/polkadot/default.nix
2024-06-09 22:47:12 +01:00
Alexis Hildebrandt
f8c4a98e8e treewide: Remove the definite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
2024-06-09 23:08:46 +02:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
github-actions[bot]
afa876d6fe
Merge staging-next into staging 2024-06-09 12:01:33 +00:00
Alyssa Ross
bf13eca852
rustc: disable wasm32 if some gcc options are set
This is a temporary fix to get rustc building again with these
configurations (which notably include the default aarch64-darwin one)
without causing a stdenv rebuild.  The real fix will be to avoid
passing these options through the Clang wrapper when the target is
overridden.

It could be that there are packages that need wasm32-unknown-unknown
beyond those I've marked as broken here — it's impossible to be sure
without a full rebuild.  But this should be most of them.
2024-06-09 07:20:18 +01:00
github-actions[bot]
d7993cebbc
Merge staging-next into staging 2024-06-05 12:01:43 +00:00
Alyssa Ross
ddc356c1f0 buildPackages.rustc: fix cross
Fixes: 23d4f83453 ("cargo,clippy,rustc,rustfmt: 1.77.2 -> 1.78.0")
2024-06-05 09:58:33 +01:00
Artemis Tosini
8135af13f1 rustc: Add support for FreeBSD 2024-05-31 14:12:12 -07:00
Vladimír Čunát
30d447f909
Merge #309580: cargo,clippy,rustc,rustfmt: 1.77.2 -> 1.78.0
...into staging
2024-05-30 11:16:59 +02:00
Alyssa Ross
07f40e6892 rustc: don't try to use non-existent rust-lld
This removes the need to manually override Rust's default linker for
every package that builds for wasm32-unknown-unknown.
2024-05-29 23:08:09 +02:00
Alyssa Ross
b08a915532 treewide: drop workarounds for cargo --frozen
Since 4816a73bb5 ("rustPlatform: --frozen -> --offline"), these are
no longer necessary!
2024-05-19 11:15:55 +02:00
Alyssa Ross
23d4f83453
cargo,clippy,rustc,rustfmt: 1.77.2 -> 1.78.0 2024-05-06 11:52:01 +02:00
github-actions[bot]
dfdd2255bb
Merge staging-next into staging 2024-05-01 18:01:55 +00:00
John Ericson
266cdd7d37 treewide: freebsd13 -> freebsd
Co-authored-by: Alyssa Ross <hi@alyssa.is>
2024-04-30 18:20:23 -04:00