Commit Graph

101 Commits

Author SHA1 Message Date
figsoda
b9259df616 rustPlatform.buildRustPackage: fix cross compiling auditable packages 2023-01-12 12:22:59 -05:00
figsoda
82fe76d1cd carnix,cratesIO: remove 2022-11-22 14:10:25 -05:00
Alex Martens
bac7ee3208 rustc: fix build for no_std targets 2022-10-07 07:35:29 -07:00
Guillaume Girol
7794eb89c8 rls: remove
will be removed upstream in next rust release: https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html
2022-09-07 12:00:00 +00:00
Nick Cao
be29f4575e
rustc: expose correct llvmPackages for cross compile 2022-05-13 06:40:43 +08:00
John Ericson
18ed048c7b build-support/rust: Organize
- `toRustTarget` and friends pulled out from rust tools into rust
   library. Since they don't depend on any packages they can be more
   widely useable.

 - `build-rust-package` gets its own directory

 - `fetch-cargo-tarball` gets its own directory
2021-11-07 14:16:49 -05:00
Martin Weinelt
c28e3f9d00
rustc: Expose llvmPackages set used to build rustc
Reusing the same llvmPackages version used for building rustc is
required for LTO in Firefox.
2021-11-02 17:34:05 +01:00
John Wiegley
96c0f7e4dd
rustPackages.rls: Fix 1.55 build on Darwin (#140232)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-10-03 02:16:19 +02:00
Robin Stumm
d89c29deb8 rust.toRustTarget: fix for windows
change vendor from "w64" to "pc"
broken since 91718534f1
2021-08-20 12:43:02 +02:00
Zhaofeng Li
6288319a3a rust: Add support for riscv64 2021-05-31 14:55:35 -07:00
Ben Wolsieffer
9d6134ae6d rustc: allowing building for ARMv5
toRustTarget needed to handle the armv5tel case
2021-05-15 11:43:51 -04:00
Luka Blaskovic
c73d96f776 rustc: cleanup, use correct llvm version 2020-12-14 15:14:03 +00:00
John Ericson
b7650aaa77 rust: Clean up target configs and test some more
See the new docs for details. The difference is vis-a-vis older versions
of this PR, not master.
2020-11-28 19:36:28 +00:00
John Ericson
c6617d28ef Merge remote-tracking branch 'upstream/master' into aj-rust-custom-target 2020-11-28 17:09:12 +00:00
Frederik Rietdijk
b981eca057 Merge master into staging-next 2020-10-14 11:32:49 +02:00
John Ericson
c0df12de5d rust: Add support for managing target JSON in Nix 2020-10-14 04:20:23 +00:00
John Ericson
f3db41d730
Merge pull request #99335 from obsidiansystems/make-rust-platform-separate
makeRustPlatform: Put back in it's own file.
2020-10-13 22:15:47 -04:00
John Ericson
54b4b470c3 makeRustPlatform: Put back in it's own file.
We expose it on the top level, but I don't think it makes sense to pull
it from a specific version of the rust tools when it is in fact version
agnostic.

This reverts a tiny portion of 912dca193a.
2020-10-13 20:05:29 -04:00
Frederik Rietdijk
9e1943edc0 Merge master into staging-next 2020-10-13 19:34:34 +02:00
Ben Wolsieffer
f0fdecfbb4 buildRustCrate: fix target config environment variables on 32-bit ARM 2020-09-29 01:40:06 -04:00
Bas van Dijk
b837bd4305 rust: 1.45.2 -> 1.46.0
This adds the rust toolchain 1.46.0:

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1460-2020-08-27

Because rustc-1.46.0 enables static PIE by default for
`x86_64-unknown-linux-musl` this release will suffer from:

https://github.com/NixOS/nixpkgs/issues/94228

So this commit doesn't remove the 1.45.2 release.

This commit also specifies the right LLVM packages to use for each
rust release.
2020-09-23 16:26:20 +02:00
John Ericson
19a0b38cbe
Merge pull request #82882 from obsidiansystems/armv6-embedded
Misc fixes for armv6 bare metal cross
2020-03-19 10:38:22 -04:00
Benjamin Hipple
05343f6ff1 rust: remove legacy cargo fetcher
We have now migrated every single Rust package in NixPkgs! This deletes the
legacy fetcher, which is now unused.

Resolves #79975
2020-03-18 20:12:32 -07:00
John Ericson
783fa4616e rustc: Add way to override the arch and config triple for rust
Sometimes it is useful for it to be slightly different. Going forward we
should, however, try to make this fallback rarely needed.
2020-03-12 09:56:55 -04:00
John Ericson
83a4705f49
Merge pull request #80843 from obsidiansystems/rust-no-std
rust 1.41: Fix build with no_std only target
2020-02-23 00:48:45 -05:00
John Ericson
0b0e691833 rust 1.41: Fix build with no_std only target
See https://github.com/rust-lang/rust/pull/69381
2020-02-22 18:34:05 -05:00
Benjamin Hipple
2115a2037c fetchcargo: use flat tar.gz file for vendored src instead of recursive hash dir
This has several advantages:

1. It takes up less space on disk in-between builds in the nix store.
2. It uses less space in the binary cache for vendor derivation packages.
3. It uses less network traffic downloading from the binary cache.
4. It plays nicely with hashed mirrors like tarballs.nixos.org, which only
   substitute --flat hashes on single files (not recursive directory hashes).
5. It's consistent with how simple `fetchurl` src derivations work.
6. It provides a stronger abstraction between input src-package and output
   package, e.g., it's harder to accidentally depend on the src derivation at
   runtime by referencing something like `${src}/etc/index.html`. Likewise, in
   the store it's harder to get confused with something that is just there as a
   build-time dependency vs. a runtime dependency, since the build-time
   src dependencies are tarred up.

Disadvantages are:
1. It takes slightly longer to untar at the start of a build.

As currently implemented, this attaches the compacted vendor.tar.gz feature as a
rider on `verifyCargoDeps`, since both of them are relatively newly implemented
behavior that change the `cargoSha256`.

If this PR is accepted, I will push forward the remaining rust packages with a
series of treewide PRs to update the `cargoSha256`s.
2020-02-10 10:17:29 -05:00
Daiderd Jordan
8df4338f51
rustPackages: make rustc-dev optional
This was only introduced in 1.40.0 and doesn't work on older versions.

    thread 'main' panicked at 'Error: no rules matched rustc-dev.', src/bootstrap/builder.rs:231:21
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
    failed to run: /build/rustc-1.38.0-src/build/bootstrap/debug/bootstrap dist rustc-dev
2020-01-18 10:57:13 +01:00
Alyssa Ross
b9d274b89d rustPlatform.fetchcargo: expose 2019-12-23 18:27:56 +00:00
Ben Wolsieffer
83ac9c07e4 rust: add support for armv6l-linux and armv7l-linux 2019-11-23 19:19:31 -05:00
taku0
97f20c3011 rust: keep multiple version.
Firefox 70.0.1 and Thunderbird 68.2.2 require older version of rustc.
2019-11-08 21:12:01 +09:00
Symphorien Gibol
d9d0647046 rls: tie version to rustc's 2019-08-21 11:21:01 +02:00
Bas van Dijk
b9c4bef090
Merge pull request #66713 from basvandijk/rustfmt-from-rust-src
rustfmt: use the src as defined by the git submodule in rust
2019-08-19 15:14:23 +02:00
Bas van Dijk
16cb2611d9 rustfmt: use the src as defined by the git submodule in rust
This commit makes sure rustc and rustfmt are compatible by setting
rustfmt's src to the rustfmt git submodule as defined in:

https://github.com/rust-lang/rust/tree/1.36.0/src/tools
2019-08-16 12:54:05 +02:00
Bas van Dijk
682e6fafa4 rustPackages.clippy: init at rust-1.36.0 2019-08-16 09:18:32 +02:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Matthew Bauer
f0b7561275 rustc: use llvm5 for bootstrapping 2019-04-26 21:55:09 -04:00
Michael Eden
54e9082375 rust: Don't force gcc6 2019-03-29 11:11:53 -04:00
Jörg Thalheim
912dca193a rust: fix cross-compilation 2019-03-29 11:11:00 -04:00
Luka Blaskovic
cc5b55f944 rust: 1.31.0 -> 1.32.0 2019-01-22 08:05:17 +00:00
Jörg Thalheim
3a5b4a631d
rustc: 1.30.1 -> 1.31.0 2018-12-06 22:22:10 +00:00
Jörg Thalheim
9e39329e1f
Merge pull request #50006 from alyssais/rust-1.30.1
rust: 1.30.0 -> 1.30.1
2018-11-14 11:29:22 +00:00
Alyssa Ross
934e489401
rust: 1.30.0 -> 1.30.1 2018-11-09 15:27:52 +00:00
Symphorien Gibol
4b0d441cc4 rustc: build with system llvm and jemalloc
Just like fedora does: https://src.fedoraproject.org/rpms/rust/blob/master/f/rust.spec

Also some cleanup of tests which were removed but no longer exist.
2018-11-08 13:04:37 +01:00
Daiderd Jordan
1b47b95638
cargo: fix darwin build
It depends the Security framework now.
2018-10-26 16:06:56 +01:00
Jörg Thalheim
cafecf16af
rust: 1.29.1 -> 1.30.0 2018-10-26 10:37:46 +01:00
Andreas Rammhold
aef6830d3e rustc: 1.29.0 -> 1.29.1
From the changelog:

- The standard library's `str::repeat` function contained an out of bounds write
  caused by an integer overflow. This has been fixed by deterministically
  panicking when an overflow happens.
2018-10-03 16:26:48 +02:00
Symphorien Gibol
ffafe959ee rustc: 1.27 -> 1.29 2018-09-14 14:22:56 +02:00
Eelco Dolstra
323fe3a305
rustc: Disable tests for now 2018-07-09 12:35:01 +02:00
Jörg Thalheim
cbdd14bdc8 rustc: 1.26.2 -> 1.27.0 2018-06-21 17:20:37 -05:00