Commit Graph

26 Commits

Author SHA1 Message Date
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
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
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