1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00
nixpkgs/pkgs
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
..
applications firefox: Update to 37.0.2 2015-04-21 16:48:46 +02:00
build-support buildRustPackage: Fix Cargo.lock being ignored 2015-04-23 02:58:07 +02:00
data geolite-legacy 2015-04-16 -> 2015-04-21 2015-04-21 01:48:28 +02:00
desktops e19/rage: fixed sha 2015-04-09 18:40:07 +03:00
development buildRustPackage: Fix Cargo.lock being ignored 2015-04-23 02:58:07 +02:00
games Merge pull request #7487 from oxij/fix-update-stepmania 2015-04-20 20:39:33 +02:00
misc Merge pull request #7437 from AndersonTorres/atari800 2015-04-21 03:39:37 +02:00
os-specific kernel: 3.14.38 -> 3.14.39 2015-04-20 22:41:47 -07:00
servers Merge pull request #6880 from offlinehacker/pkgs/skydns/add 2015-04-19 10:43:05 +02:00
shells meta.homePage -> homepage 2015-04-20 14:20:03 +02:00
stdenv
test
tools zfstools 0.3.1 -> 0.3.2 2015-04-21 02:40:50 +02:00
top-level Add support for building cargo'ed Rust programs 2015-04-21 19:46:29 +02:00