3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

332 commits

Author SHA1 Message Date
Sandro c1a8f04935
Merge pull request #126725 from SuperSandro2000/cargo-no-ruby 2021-06-15 02:50:23 +02:00
Sandro Jäckel f3ce27d2db
rust: remove ruby from rustPlatform 2021-06-13 20:38:22 +02:00
github-actions[bot] 65e3e9dc51
Merge master into staging-next 2021-06-01 07:50:21 +00:00
Zhaofeng Li 6288319a3a rust: Add support for riscv64 2021-05-31 14:55:35 -07:00
github-actions[bot] f2a2e8f5e9
Merge master into staging-next 2021-05-28 12:48:40 +00:00
Daniël de Kok 1da0b1dbc9
Merge pull request #122158 from danieldk/import-cargo-lock
rustPlatform.buildRustPackage: support direct use of Cargo.lock
2021-05-28 12:07:25 +02:00
Daniël de Kok b3969f3ad7 rustPlatform.buildRustPackage: support direct use of Cargo.lock
This change introduces the cargoLock argument to buildRustPackage,
which can be used in place of cargo{Sha256,Hash} or cargoVendorDir. It
uses the importCargoLock function to build the vendor
directory. Differences compared to cargo{Sha256,Hash}:

- Requires a Cargo.lock file.
- Does not require a Cargo hash.
- Retrieves all dependencies as fixed-output derivations.

This makes buildRustPackage much easier to use as part of a Rust
project, since it does not require updating cargo{Sha256,Hash} for
every change to the lock file.
2021-05-28 08:01:28 +02:00
Daniël de Kok 2f46d77e28 rustPlatform.importCargoLock: init
This function can be used to create an output path that is a cargo
vendor directory. In contrast to e.g. fetchCargoTarball all the
dependent crates are fetched using fixed-output derivations. The
hashes for the fixed-output derivations are gathered from the
Cargo.lock file.

Usage is very simple, e.g.:

importCargoLock {
  lockFile = ./Cargo.lock;
}

would use the lockfile from the current directory.

The implementation of this function is based on Eelco Dolstra's
import-cargo:

https://github.com/edolstra/import-cargo/blob/master/flake.nix

Compared to upstream:

- We use fetchgit in place of builtins.fetchGit.
- Sync to current cargo vendoring.
2021-05-28 08:01:25 +02:00
github-actions[bot] a673990e6c
Merge master into staging-next 2021-05-25 18:43:22 +00:00
Daniël de Kok 7eddab91f5
Merge pull request #123867 from danieldk/maturin-0.10.5
maturin: 0.10.4 -> 0.10.6
2021-05-25 16:01:47 +02:00
Daniël de Kok 11307c1d47 maturinBuildHook: add rustc to deps
maturin 0.10.5 uses rustc -vV to find the host:

e886c85f5a

We now need to make rustc visible to the hook for maturin to work
properly.
2021-05-21 07:51:27 +02:00
Luka Blaskovic ded99630e9 rustc: 1_52, use correct llvm version 2021-05-17 08:40:12 -07:00
github-actions[bot] 5c18268a6b
Merge staging-next into staging 2021-05-16 06:22:08 +00:00
github-actions[bot] d6fe7f78a8
Merge master into staging-next 2021-05-16 06:22:05 +00:00
Ben Wolsieffer 9d6134ae6d rustc: allowing building for ARMv5
toRustTarget needed to handle the armv5tel case
2021-05-15 11:43:51 -04:00
Jonathan Ringer 4bb359aa99 rustc: 1.52.0 -> 1.52.1 2021-05-10 16:00:44 -07:00
Pavol Rusnak 252bf94a74 rust: 1.51.0 -> 1.52.0 2021-05-08 11:42:10 -07:00
John Ericson 50b6631929 rustc: Fix build
Thanks @jonringer for catching, and sorry I didn't myself!
2021-04-30 23:09:15 -07:00
Andrew Childs 7869d16545 llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.

The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.

Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.

----

Other misc notes, highly incomplete

- lvm-config-native and llvm-config are put in `dev` because they are
  tools just for build time.

- Clang no longer has an lld dep. That was introduced in
  db29857eb3, but if clang needs help
  finding lld when it is used we should just pass it flags / put in the
  resource dir. Providing it at build time increases critical path
  length for no good reason.

----

A note on `nativeCC`:

`stdenv` takes tools from the previous stage, so:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`

while:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2021-04-30 05:41:00 +00:00
Finn Behrens 30e6c07310 rustc: reenable aarch64-darwin for 1.51.0 2021-04-09 13:53:51 +02:00
Arthur Gautier 6f73a8570c rust: 1.50.0 -> 1.51.0
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-04-02 06:03:40 +10:00
Ivan Babrou 2cf3641a5c rustc: update llvm on darwin to current
We downgraded when LLVM 10 wasn't working well on Darwin: #101136.
Now that we're using LLVM 11, the issue is no longer present.
2021-03-20 06:12:48 +10:00
Jörg Thalheim fc02aa17fe
Merge pull request #112792 from Kloenk/rust_1-50-0
rust: 1.49.0 -> 1.50.0
2021-03-07 13:56:59 +00:00
Ben Siraphob e03c068af5 treewide: makeWrapper buildInputs to nativeBuildInputs 2021-02-19 20:09:16 +07:00
Daniël de Kok 2376921de5 rls: update preBuild for changes in buildRustPackage
preBuild is now run before changing to buildAndTestSubdir, so use full
path to tests/client.rs in preBuild.
2021-02-17 16:47:15 +01:00
Daniël de Kok 05e40e79a8 buildRustPackage: factor out check phase to cargoCheckHook
API change:

`cargoParallelTestThreads` suggests that this attribute sets the
number of threads used during tests, while it is actually a boolean
option (use 1 thread or NIX_BUILD_CORES threads). In the hook, this
is replaced by a more canonical name `dontUseCargoParallelTests`.
2021-02-16 08:09:15 +01:00
Daniël de Kok 9757c7101a buildRustPackage: factor out install phase to cargoInstallHook 2021-02-15 12:17:18 +01:00
Finn Behrens 70dd7b038b
rust: 1.49.0 -> 1.50.0 2021-02-14 10:28:40 +01:00
Daniël de Kok 160cf87086 rustPlatform.maturinBuildHook: init
This build hook can be used to build Python packages using maturin.
2021-02-12 08:40:43 +01:00
Daniël de Kok a8efb2053f buildRustPackage: factor out build phase to cargoBuildHook
- API change: remove the `target` argument of `buildRustPackage`, the
  target should always be in sync with the C/C++ compiler that is used.

- Gathering of binaries has moved from `buildPhase` to `installPhase`,
  this simplifies the hook and orders this functionality logically
  with the installation logic.
2021-02-11 20:00:12 +01:00
Daniël de Kok d083f412fa buildRustPackage: factor out setting up .cargo/config to cargoSetupHook
This makes it possible to reuse this functionality as a hook in
derivations that do not use buildRustPackage.
2021-02-10 07:01:24 +01:00
volth bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Ben Siraphob acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
Jörg Thalheim 5e0f8f6762
Merge pull request #109919 from pjjw/musl-rust-bootstrap-fix
rust: add musl-libc targets to bootstrapping
2021-01-21 15:24:35 +00:00
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Peter Woodman 0b8620e9b6
rust: add musl-libc targets to bootstrapping 2021-01-19 02:27:41 -05:00
Frederik Rietdijk 379ca4ddcf Merge staging-next into staging 2021-01-09 13:29:53 +01:00
Pavol Rusnak 271f4001c3
rust: fix comment about invocation of print-hashes.sh 2021-01-08 14:38:42 +01:00
Jörg Thalheim 4a580eb51b
Merge pull request #108635 from petabyteboy/feature/rust-1-49
rust: 1.48.0 -> 1.49.0
2021-01-08 05:31:47 +00:00
Luka Blaskovic 1f3cc427dc rls: set RUST_SRC_PATH to rustLibSrc 2021-01-07 10:31:03 +00:00
Milan Pässler dde8ad8d12
rust: 1.48.0 -> 1.49.0 2021-01-07 04:11:51 +01:00
Luka Blaskovic c73d96f776 rustc: cleanup, use correct llvm version 2020-12-14 15:14:03 +00:00
github-actions[bot] 11d68e6adb
Merge staging-next into staging 2020-12-13 00:42:45 +00:00
Ben Wolsieffer 5a923e552c rustc: add host platform to --target when building cross-compiler
As of 1.48, std is only built for platforms in --target. If the host platform is
not included, the resulting rustc can't compile build.rs scripts.
2020-12-12 15:24:55 -05:00
Jörg Thalheim 650db4a0db
Merge pull request #106284 from raboof/rustc-deterministic-manifest 2020-12-08 09:47:33 +00:00
Arnout Engelen b909a333ad
rustc: generate deterministic manifest
The order of the entries in the manifest generated while installing
rustc depends on the (parallel) build, so let's sort it to make it
deterministic. Also remove install.log from the output.

Co-Authored-By: Jörg Thalheim <joerg@thalheim.io>
2020-12-07 23:02:09 +01:00
John Ericson 68fa053f46
Merge pull request #105383 from NixOS/more-rustc-musl
rustc: Improve musl support
2020-12-02 11:16:24 -05:00
John Ericson 47b99769f9 rustc: Improve musl support
There was a slight error in the target logic I didn't notice before, and
also should do the same thing for the other platforms.
2020-12-02 15:30:51 +00:00
Frederik Rietdijk 0d8491cb2b Merge master into staging-next 2020-11-29 13:51:10 +01:00
John Ericson 5d75fe4ed0
Merge pull request #105314 from lopsided98/rustc-musl-target
rustc: allow building for musl targets
2020-11-29 00:39:36 -05:00