1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00
nixpkgs/pkgs/top-level
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
..
all-packages.nix cargo, cargoSnapshot: add rustc runtime dependency 2015-11-18 02:41:45 +01:00
dotnet-packages.nix fsharp: 3.1.2.5 -> 4.0.0.4 2015-11-11 10:54:10 +01:00
emacs-packages.nix emacs-packages.rust-mode: init at 20151026 (close #10674) 2015-11-16 16:46:04 +01:00
go-packages.nix Merge pull request #11048 from offlinehacker/pkgs/influxdb/update_0.9.4 2015-11-17 17:18:24 +01:00
guile-2-test.nix
haskell-packages.nix Add LTS Haskell 3.14. 2015-11-17 11:13:20 +01:00
lua-packages.nix lua-bitop: update MACOSX_DEPLOYMENT_TARGET 2015-10-22 13:47:03 -07:00
make-tarball.nix Add stdenv bootstrap tools generation to release.nix 2015-10-23 13:05:36 +02:00
node-packages-generated.nix node-packages: add a few packages, fix, regenerate 2015-04-25 14:54:26 +02:00
node-packages.json node-packages: add a few packages, fix, regenerate 2015-04-25 14:54:26 +02:00
node-packages.nix node-packages: add a few packages, fix, regenerate 2015-04-25 14:54:26 +02:00
perl-packages.nix perl-Log-Log4perl: 1.43 -> 1.46 2015-11-17 00:06:02 +01:00
php-packages.nix phpcs: init at 2.3.4 2015-10-12 12:11:54 +02:00
platforms.nix platforms.nix: Use bcm2835_defconfig for RPi kernelHeadersBaseConfig 2015-11-16 02:37:13 +02:00
pure-packages.nix Fairly complete set of packages for Pure 2015-05-26 17:51:07 +10:00
python-packages.nix Merge pull request #11103 from samuelrivas/add-mixpanel 2015-11-17 22:30:33 +01:00
release-cross.nix Disable system_tarball_pc and fix eval 2015-07-22 12:27:15 +02:00
release-lib.nix release-lib.nix: set inHydra anyways, it might be useful some day 2015-07-17 15:33:49 +02:00
release-python.nix
release-small.nix tetex: don't build on Hydra anymore 2015-09-23 21:19:14 +02:00
release.nix Add stdenv bootstrap tools generation to release.nix 2015-10-23 13:05:36 +02:00
rust-packages.nix rustRegistry: 2015-10-18 -> 2015-11-01 2015-11-01 12:19:19 +00:00