Commit Graph

13 Commits

Author SHA1 Message Date
Jude Taylor
45ea4956d8 fix library dependencies for cargo on darwin 2016-02-23 16:42:51 -08:00
Ricardo M. Correia
2b694c237b cargo, cargoSnapshot: add rustc runtime dependency
It turns out that cargo implicitly depends on rustc at runtime: even
`cargo help` will fail if rustc is not in the PATH.

This means that we need to wrap the cargo binary to add rustc to PATH.
However, I have opted into doing something slightly unusual: instead of
tying down a specific cargo to use a specific rustc (i.e., wrap cargo so
that "${rustc}/bin" is prefixed into PATH), instead I'm adding the rustc
used to build cargo as a fallback rust compiler (i.e., wrap cargo so
that "${rustc}/bin" is suffixed into PATH). This means that cargo will
prefer to use a rust compiler that is in the default path, but fallback
into the one used to build cargo only if there wasn't any rust compiler
in the default path.

The reason I'm doing this is that otherwise it could cause unexpected
effects. For example, if you had a build environment with the
rustcMaster and cargo derivations, you would expect cargo to use
rustcMaster to compile your project (since rustcMaster would be the only
compiler available in $PATH), but this wouldn't happen if we tied down
cargo to use the rustc that was used to compile it (because the default
cargo derivation gets compiled with the stable rust compiler).

That said, I have slightly modified makeRustPlatform so that a rust
platform will always use the rust compiler that was used to build cargo,
because this prevents mistakenly depending on two different versions of
the rust compiler (stable and unstable) in the same rust platform,
something which is usually undesirable.

Fixes #11053
2015-11-18 02:41:45 +01:00
Ricardo M. Correia
2817e74d37 cargo: Add myself to maintainers 2015-05-19 19:02:38 +02:00
Ricardo M. Correia
0cde1dc524 cargo: Remove setupHook
Instead, move that code into buildRustPackage.

The setup hook was only doing part of the work anyway, and having it in
a separate place was obscuring what was really going on.
2015-04-23 15:26:23 +02:00
Georges Dubus
7d67efa3f2 Add support for building cargo'ed Rust programs 2015-04-21 19:46:29 +02:00
John Ericson
8d96df76b9 cargo: common.nix now only contains version-agnostic bits 2015-01-08 08:38:20 +00:00
Ricardo M. Correia
9ad3f0ed7e cargoSnapshot: Update from 2014-12-21 -> 2014-12-30 2015-01-07 05:50:17 +01:00
Tobias Geerinckx-Rice
c64257b8e5 Fix user-facing typos (mainly in descriptions) 2014-12-30 03:31:03 +01:00
John Wiegley
28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00
Ricardo M. Correia
66ca0b6163 cargoSnapshot: Update from 2014-11-22 -> 2014-12-21 2014-12-22 23:40:30 +01:00
Ricardo M. Correia
ca6d86b7fb cargoSnapshot: Update from 2014-09-19 -> 2014-11-22 2014-11-25 01:07:10 +01:00
Ricardo M. Correia
a1f76142b4 cargoSnapshot: Fix evaluation error when building tarball 2014-09-26 02:22:04 +02:00
Ricardo M. Correia
614a99bd8e cargoSnapshot: Add package
Cargo downloads your Rust project's dependencies and builds your
project.

The cargoSnapshot derivation simply uses a binary build, because
it's not easy to build cargo from source yet.

In the future, it's expected that we'll also add a derivation for
building cargo from source.
2014-09-24 18:18:15 +02:00