Commit graph

33 commits

Author SHA1 Message Date
Robert Helgesson 82daa41e29
cargo: install bash and zsh completion scripts 2020-06-27 21:21:43 +02:00
Maximilian Bosch 6b23cfe689
rustPlatform: add buildAndTestSubdir-argument
There are several tarballs (such as the `rust-lang/rust`-source) with a
`Cargo.toml` at root and several sub-packages (with their own Cargo.toml)
without using workspaces[1].

In such a case it's needed to move into a subdir to only build the
specified sub-package (e.g. `rustfmt` or `rsl`), however the artifacts
are at `/target` in the root-dir of the build environment. This breaks
the build since `buildRustPackage` searches for executables in `target`
(which is at the build-env's root) at the end of the `buildPhase`.

With the optional `buildAndTestSubdir`-argument, the builder moves into
the specified subdir using `pushd`/`popd` during `buildPhase` and
`checkPhase`.

Also moved the logic to find executables and libs to the end of the `buildPhase`
from a custom `postBuild`-hook to fix packages with custom `build`/`install`-procedures
such as `uutils-coreutils`.

[1] https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
2020-05-13 01:47:17 +02:00
Michael Reilly 84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Alyssa Ross e1ed62abc2 cargo: install man pages
I thought about doing a seperate output for these, but they're tiny
compared to the size of the binary, so there's no point.

(cherry picked from commit 0489c1b4b20d13fa04e6460ead73893889ff2529)
2020-02-12 17:56:01 +01:00
Andreas Rammhold 5c8612d90c
cargo: use bundled libgit2
Cargo uses git-rs which is made to be built against the bundled libgit2
version that hasn't been part of a stable release yet. Using our libgit2
instead of the master version fails during runtime as they are not
compatible anymore.

After the next libgit2 update we can try again but it is likely that
there will also be yet another cargo release at that point in time…
2020-02-12 17:16:32 +01:00
Jan Tojnar 08c0f1200a
cargo: switch to python3 2019-12-15 13:52:40 +01:00
Ricardo M. Correia 7ec975fa84 rustc, cargo: remove myself from maintainers 2019-10-08 19:52:47 +02:00
volth 08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
arcnmx b53e237ef6
cargo: remove darwin hack
This seems to have recently resolved itself with updates
and is no longer necessary.
2019-07-29 06:50:20 +01:00
Jörg Thalheim 912dca193a rust: fix cross-compilation 2019-03-29 11:11:00 -04:00
Michael Eden 3c930188c8 cargo: No need to skip space around = at Nix level 2019-03-29 10:28:20 -04:00
Luka Blaskovic cc5b55f944 rust: 1.31.0 -> 1.32.0 2019-01-22 08:05:17 +00:00
Daiderd Jordan 1b47b95638
cargo: fix darwin build
It depends the Security framework now.
2018-10-26 16:06:56 +01:00
Symphorien Gibol ffafe959ee rustc: 1.27 -> 1.29 2018-09-14 14:22:56 +02:00
Tuomas Tynkkynen 7e0561370b rust: Set dontUpdateAutotoolsGnuConfigScripts everywhere
It's needed on ARM nowadays as well, so just put it everywhere.
2018-08-14 10:40:47 +03:00
volth 52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Jörg Thalheim a7ab32ba98 cargo: unbreak aarch64 build 2018-02-22 11:46:30 +00:00
Jörg Thalheim f61e8d98ff
rust: 1.22.1 -> 1.24.0 2018-02-20 09:59:26 +00:00
Tuomas Tynkkynen 3effd5bb05 cargo: Should be supported on all Linux platforms now 2018-02-03 13:51:03 +02:00
Daiderd Jordan 091c2b9f04
cacert: cleanup exporting SSL_CERT_FILE 2017-12-27 21:36:32 +01:00
Daiderd Jordan cf9e6f3a18
cargo: fix darwin build 2017-11-05 11:33:42 +01:00
Robin Gloster bed5bb1f5e
fix eval
cc @zimbatm

(https://nix-cache.s3.amazonaws.com/log/iyn9cwk0kymi4mzva0dzpqwnzm3cg4a4-nixpkgs-tarball-18.03pre118395.891c3721ed.drv)
2017-10-23 15:12:39 +02:00
Daiderd Jordan f1f7296885
cargo: fix darwin build 2017-10-23 10:24:17 +02:00
Kevin Cox 5f8cf0048e rust: update cargo builder to fetch registry dynamically
The biggest benefit is that we no longer have to update the registry
package. This means that just about any cargo package can be built by
nix. No longer does `cargo update` need to be feared because it will
update to packages newer then what is available in nixpkgs.

Instead of fetching the cargo registry this bundles all the source code
into a "vendor/" folder.

This also uses the new --frozen and --locked flags which is nice.

Currently cargo-vendor only provides binaries for Linux and
macOS 64-bit. This can be solved by building it for the other
architectures and uploading it somewhere (like the NixOS cache).

This also has the downside that it requires a change to everyone's deps
hash. And if the old one is used because it was cached it will fail to
build as it will attempt to use the old version. For this reason the
attribute has been renamed to `cargoSha256`.

Authors:
* Kevin Cox <kevincox@kevincox.ca>
* Jörg Thalheim <Mic92@users.noreply.github.com>
* zimbatm <zimbatm@zimbatm.com>
2017-10-23 00:30:47 +01:00
zimbatm d170c2cead cargo: use fetchFromGitHub 2017-10-23 00:30:46 +01:00
zimbatm 7bd191df6a rust: 1.17.0 -> 1.20.0
simplify the boostrap hashes a bit

build with bundled llvm:

the rust project has forked the llvm compiler to solve some
issues.
With pkgs.llvm the test suite fails.

See https://github.com/rust-lang/rust/pull/43026

And PR #30088
2017-10-23 00:30:46 +01:00
John Ericson 531e4b80c9 misc pkgs: Basic sed to get fix pkgconfig and autoreconfHook buildInputs
Only acts on one-line dependency lists.
2017-09-21 15:49:53 -04:00
Matthew Bauer f2141a96e5 cargo: use https://crates.io for homepage 2017-08-17 15:04:39 -07:00
Jörg Thalheim af416aae81
cargo: remove unnecessary rm
Since cargo build became a rust package, postInstall hook was no longer
called. When the hook was reenabled in
cdd11368426380db545cad84c76e350e5e201adc, it revealed that scripts
leftover from the component based installer are no longer present.
2017-04-17 00:29:44 +02:00
Reno Reckling 8e2a4e0948 cargo: do not make install in cargo (#21799)
cargo is already a cargo package, so why not build it with cargo
and safe us the special cases
2017-01-11 12:33:53 +01:00
Tadas Barzdzius 31ec0795f6 cargo: 0.14 -> 0.15 2016-12-29 09:56:19 +02:00
Moritz Ulrich 57a690fbe4 cargo: Force usage of pkgs.cacert. 2016-08-10 21:16:48 +02:00
David Craven 54f80775cb rust: Refactoring of rust and cargo packages 2016-06-15 12:47:13 +02:00
Renamed from pkgs/development/tools/build-managers/cargo/generic.nix (Browse further)