Commit Graph

342 Commits

Author SHA1 Message Date
Bernardo Meurer
00334d352f
Revert "makeRustPlatform: allow to easily override stdenv"
This reverts commit f17c3516fb.
2021-10-28 23:25:35 -07:00
Bernardo Meurer
f17c3516fb
makeRustPlatform: allow to easily override stdenv 2021-10-26 22:13:38 -07: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
Alyssa Ross
28a97eab19
rust: 1.54.0 -> 1.55.0 2021-09-10 09:26:43 +00:00
Alyssa Ross
a43efb9884
cargo: don't use vendored curl
Using the curl from Nixpkgs will fix Cargo 0.55.0 on Darwin.
2021-09-10 09:26:42 +00:00
Jan Tojnar
7a04c2ad68 Merge branch 'staging-next' into staging
- boost 171 removed on staging-next
- re-generated node-packages.nix

; Conflicts:
;	pkgs/development/java-modules/m2install.nix
;	pkgs/development/node-packages/node-packages.nix
;	pkgs/top-level/all-packages.nix
2021-08-22 01:13:41 +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
Alyssa Ross
1d1ef50501 rustc: 1.53.1 -> 1.54.0
Tested builds of fd and firefox on x86_64-linux.
2021-07-30 11:26:01 +00:00
Alyssa Ross
37ac6d6e76 rustc: 1.52.1 -> 1.53.0 2021-06-19 10:16:10 +09:00
Alyssa Ross
181f012824 rustc: don't install uninstall.sh 2021-06-18 13:58:16 +00:00
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