nixpkgs/pkgs/build-support
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
..
agda agda: Remove unused/uneeded abstractions, including postprocess 2015-05-31 01:55:10 +00:00
autonix autonix: JSON manifest format 2015-06-25 09:03:40 -05:00
build-dotnet-package build-dotnet-package: add optional makeWrapperArgs argument 2015-10-29 06:02:18 +03:00
build-fhs-chrootenv Revert "Revert "Merge pull request #9543 from NixOS/staging.post-15.06"" 2015-11-14 12:32:51 -08:00
build-fhs-userenv build-fhs-userenv: fix extraBindMounts 2015-10-07 14:58:37 +03:00
buildenv Fix buildenv 2015-10-30 18:09:45 -07:00
builder-defs Don't fail if env-vars cannot be written to 2015-11-04 16:32:59 +01:00
cc-wrapper darwin: use system dyld 2015-08-25 11:12:09 -07:00
dotnetbuildhelpers Lay down the foundation for packaging the .NET echosystem 2015-06-06 09:06:22 -04:00
dotnetenv Remove executable bits from non-executable files 2015-01-27 18:54:38 +01:00
emacs all-packages: Use callPackage where possible 2015-09-14 22:27:19 -06:00
fetchadc Add Apple command-line tools 2014-10-02 06:50:09 +01:00
fetchbower Make fetchBower a bit more like a normal mkDerivation, which is easier to test. 2015-07-16 14:42:16 +00:00
fetchbzr build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchcvs build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchdarcs fetchbzr, fetchdarcs, fetchhg: use rev attr 2014-06-28 21:06:10 +02:00
fetchegg Infrastructure to build chicken eggs. 2014-10-13 23:29:27 +02:00
fetchfile Fixed error in build-support/fetchfile 2011-08-09 12:28:49 +00:00
fetchgit nix-prefetch-git: pull all tags from remote when checkouting by revision 2015-09-20 18:24:34 +02:00
fetchgitlocal Rewrite fetchgitLocal 2015-10-01 22:00:44 -07:00
fetchgitrevision Remove semicolon causing evaluation error. 2011-01-02 23:52:39 +00:00
fetchhg fetchhg: fixed nix-prefetch-hg interpreter 2015-10-06 22:41:46 +03:00
fetchmtn Fix a few typos 2013-08-11 10:55:53 +00:00
fetchnuget fetchnuget: run fixupPhase to honor propagatedBuildInputs 2015-06-12 17:13:21 +02:00
fetchpatch fetchpatch: Allow to pass a postFetch attribute. 2015-06-23 03:35:30 +02:00
fetchsvn build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchsvnrevision Live builds support: initially for git and svn. taglib_live is packaged as an example. 2011-01-02 23:23:59 +00:00
fetchsvnssh
fetchurl fetchurl/builder.sh: style fix, close #10260 2015-10-07 09:48:58 +02:00
fetchzip fetchzip: fix unpacking regression 2015-01-25 20:16:21 -05:00
gcc-cross-wrapper orig-gcc -> orig-cc 2015-03-04 22:15:46 +01:00
gcc-wrapper-old orig-gcc -> orig-cc 2015-03-04 22:15:46 +01:00
grsecurity kernel: Remove unsupported 3.10, 3.12, 3.14 2015-11-09 11:10:42 -08:00
kdewrapper Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
kernel makeInitrd: Support prepending other initrds 2015-03-25 14:14:46 -07:00
libredirect citrix-receiver: init at 13.2.1, fixes #8458 2015-11-11 22:27:15 +01:00
make-desktopitem makeDesktopItem: don't generated a deprecated key 2015-06-18 10:31:48 +02:00
make-startupitem Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
make-symlinks
mono-dll-fixer
native-darwin-cctools-wrapper Darwin: Add mig', lipo', etc. to `stdenvNative'. 2012-04-23 15:47:31 +00:00
nuke-references nuke-references: support -e option 2015-10-18 18:41:11 +03:00
ocaml add an ocaml specific builder to the system 2015-05-22 10:12:21 -07:00
release clang-analyzer: align attrname with pkgname 2015-02-20 22:30:51 +01:00
rust cargo, cargoSnapshot: add rustc runtime dependency 2015-11-18 02:41:45 +01:00
setup-hooks wrapGAppsHook: fix $gappsWrapperArgs as intended 2015-11-09 15:40:20 +01:00
src-only
substitute * Set preferLocalBuild on a few more trivial builders. 2012-04-26 15:17:43 +00:00
substitute-files substituteAllFiles: add derivation 2014-10-16 15:27:25 +01:00
templaterpm Update: new features for nix-template-rpm 2015-02-06 20:12:57 +01:00
upstream-updater More support for SF.net in auto-updater 2014-09-02 14:25:16 +04:00
vm vmTools.commonDebPackages: Add "mawk". 2015-10-26 20:56:42 +01:00
vsenv * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
build-maven.nix build-maven: Add handling for snapshot version resolution 2015-07-20 09:19:12 -04:00
build-pecl.nix fix phpPackages memcache,memcached,xdebug 2015-02-05 20:28:16 +01:00
replace-dependency.nix replace-dependency.nix: Remove unnecessary carriage return. 2015-11-16 17:52:12 -05:00
source-from-head-fun.nix Remove getConfig helper function 2012-09-19 13:56:56 -04:00
trivial-builders.nix Set ‘allowSubstitutes = false’ on various derivations 2015-07-09 15:10:37 +02:00