Commit Graph

51 Commits

Author SHA1 Message Date
Nikolay Amiantov 87ebab128a replace ${stdenv.cc.cc}/lib occurences 2016-05-01 00:13:23 +03:00
Tadas Barzdzius a49ffbb196 cargo: add libiconv to buildInputs to fix darwin build 2016-04-23 23:08:02 +03:00
Tadas Barzdzius 7d661a4ab4 cargo: 0.8.0 -> 0.9.0. Enable Darwin 2016-04-20 12:42:37 +03:00
Vladimír Čunát ab15a62c68 Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
2016-04-01 10:06:01 +02:00
Jakob Gillich a9326f6f34 cargoMaster: 2016-02-25 -> 2016-03-22 2016-03-22 13:16:56 +01:00
Vladimír Čunát 09af15654f Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
2016-03-08 09:58:19 +01:00
Nikolay Amiantov a4902ff1fa rustUnstable.cargo: 2016-01-10 -> 2016-02-25 2016-02-25 14:21:46 +03:00
Jude Taylor 45ea4956d8 fix library dependencies for cargo on darwin 2016-02-23 16:42:51 -08:00
Vladimír Čunát d039c87984 Merge branch 'master' into closure-size 2016-02-14 08:33:51 +01:00
Ricardo M. Correia 52475afe77 cargo: 0.7.0 -> 0.8.0 2016-02-02 17:25:44 +01:00
Tuomas Tynkkynen ed7dbb46a8 treewide: Mass replace 'zlib}/lib' to refer the 'out' output 2016-01-24 10:03:39 +02:00
Vladimír Čunát 716aac2519 Merge branch 'staging' into closure-size 2016-01-19 09:55:31 +01:00
Nikolay Amiantov d1ed30ac0d cargoUnstable: init at 2016-01-10 2016-01-13 13:48:24 +03:00
Vladimír Čunát f9f6f41bff Merge branch 'master' into closure-size
TODO: there was more significant refactoring of qtbase and plasma 5.5
on master, and I'm deferring pointing to correct outputs to later.
2015-12-31 09:53:02 +01:00
Robin Gloster 2faea53f8e cargo: 0.6.0 -> 0.7.0 2015-12-24 13:20:24 +01:00
Luca Bruno a412927924 Merge remote-tracking branch 'origin/master' into closure-size 2015-11-25 21:37:30 +01:00
Vladimír Čunát 333d69a5f0 Merge staging into closure-size
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
2015-11-20 14:32:58 +01: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 84afac6b89 cargo: 0.5.0 -> 0.6.0 2015-11-03 20:32:12 +01:00
Vladimír Čunát 5227fb1dd5 Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
2015-10-03 13:33:37 +02:00
Robin Gloster feda2925f7 cargo: 0.3.0 -> 0.5.0 2015-09-23 21:16:16 +00:00
Ricardo M. Correia 205a6b894d cargo: workaround frequent hash mismatches due to #8567
For now, let's remove `leaveDotGit`. The only visible effect I could see
was that `cargo --version` won't report the git commit anymore, but
that's only a minor issue compared to the build breaking often.

Fixes #8566 and closes #8862.
2015-07-21 21:26:02 +02:00
Robert Irelan 51972d427e cargo: 2015-05-13 -> 0.3.0
Rename cargo to use a version number rather than a date because Cargo
has started releasing packages using version numbers.
2015-07-09 22:56:51 -07:00
Robert Irelan e6ee86b941 cargoSnapshot: 2015-04-02 -> 2015-06-17, hide from nix-env
Update snapshot to avoid rust-lang/cargo#976, which otherwise breaks the
build.

Also move the `cargoSnapshot` derivation inside a set in
pkgs/top-level/all-packages.nix in order to hide the `cargo-snapshot`
packages from `nix-env -qa`, since it's only used to build the `cargo`
package.
2015-07-09 21:14:55 -07:00
Ricardo M. Correia 2817e74d37 cargo: Add myself to maintainers 2015-05-19 19:02:38 +02:00
Ricardo M. Correia 9b752fd0e1 buildRustPackage: Don't hardcode registry index hash
Instead, discover it automatically when building the package.

This makes `buildRustPackage` more future-proof with respect to changes
in how `cargo` generates the hash.

Also, it fixes broken builds in i686 because apparently, cargo generates
a different registry index hash in this architecture (compared to
x86-64).
2015-05-19 19:02:38 +02:00
Ricardo M. Correia de322b48b7 cargo: Fix src hash
It seems that when you pass `leaveDotGit = true` to `fetchgit`, sometimes
the output can still change (i.e. it's not completely deterministic).

This could be due to changes in the upstream git repository...
2015-05-19 19:02:38 +02:00
Ricardo M. Correia 981ea747b5 cargo: 2015-05-11 -> 2015-05-13 2015-05-13 17:23:18 +02:00
Ricardo M. Correia cbdedca255 cargo: 2015-04-14 -> 2015-05-11 2015-05-12 17:28:50 +02:00
Vladimír Čunát 3b9ef2c71b fix "libc}/lib" and similar references
Done mostly without any verification.
I didn't bother with libc}/include, as the path is still correct.
2015-05-05 11:52:08 +02:00
Ricardo M. Correia d6093505cc buildRustPackage: Get rid of /proc/self/cwd hack
This makes buildRustPackage portable to non-Linux platforms.

Additionally, now we also save the `Cargo.lock` file into the fetch output, so
that we don't have to run $cargoUpdateHook again just before building.
2015-04-23 20:22:19 +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
Ricardo M. Correia e42c17ee97 buildRustPackage: Fix Cargo.lock being ignored
It turns out that `cargo`, with respect to registry dependencies, was
ignoring the package versions locked in `Cargo.lock` because we changed
the registry index URL.

Therefore, every time `rustRegistry` would be updated, we'd always try
to use the latest version available for every dependency and as a result
the deps' SHA256 hashes would almost always have to be changed.

To fix this, now we do a string substitution in `Cargo.lock` of the
`crates.io` registry URL with our URL. This should be safe because our
registry is just a copy of the `crates.io` registry at a certain point
in time.

Since now we don't always use the latest version of every dependency,
the build of `cargo` actually started to fail because two of the
dependencies specified in its `Cargo.lock` file have build failures.

To fix the latter problem, I've added a `cargoUpdateHook` variable that
gets ran both when fetching dependencies and just before building the
program. The purpose of `cargoUpdateHook` is to do any ad-hoc updating
of dependencies necessary to get the package to build. The use of the
'--precise' flag is needed so that cargo doesn't try to fetch an even
newer version whenever `rustRegistry` is updated (and therefore have to
change depsSha256 as a consequence).
2015-04-23 02:58:07 +02:00
Ricardo M. Correia d648be6724 buildRustPackage: Add check phase and enable it by default
Also disable check phase in cargo as there are lots of failures (some
probably due to trying to access the network).
2015-04-21 20:45:05 +02:00
Ricardo M. Correia 5e8a447739 cargo: Build optimized binary 2015-04-21 20:44:41 +02:00
Georges Dubus 7d67efa3f2 Add support for building cargo'ed Rust programs 2015-04-21 19:46:29 +02:00
Dmitry Belyaev 871d11c176 Update cargoSnapshot to rustc-1.0.0-beta release 2015-04-13 15:55:39 +10:00
Ricardo M. Correia e6561c5fb1 cargo: Install man page
... as well as other artifacts.
2015-03-04 18:08:52 +01:00
Jordan Woehr 5821e91bd1 Restructure rustc derivations for ease of updating.
Update racerRust to use new rustcMaster and upgrade cargoSnapshot so racer builds.
2015-03-02 12:40:55 -07:00
Vladimír Čunát dbae4f109f Merge branch 'master' into staging
Conflicts (relatively simple):
	pkgs/applications/audio/spotify/default.nix
	pkgs/build-support/cc-wrapper/default.nix
	pkgs/development/compilers/cryptol/1.8.x.nix
2015-01-31 19:34:57 +01:00
Ricardo M. Correia 2ee7809ac9 cargoSnapshot: Update from 2014-12-30 -> 2015-01-24 2015-01-27 04:36:37 +01:00
Eric Seidel f3c6827373 rename all occurrences of stdenv.cc.gcc to stdenv.cc.cc 2015-01-14 20:27:55 -08: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 a7a67e99b6 cargoSnapshot: Fix meta attributes 2014-09-25 23:30:27 +02:00