mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 21:21:06 +00:00
e42c17ee97
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). |
||
---|---|---|
.. | ||
agda | ||
autonix | ||
build-fhs-chrootenv | ||
build-fhs-userenv | ||
buildenv | ||
builder-defs | ||
cabal | ||
cc-wrapper | ||
dotnetenv | ||
emacs | ||
fetchadc | ||
fetchbower | ||
fetchbzr | ||
fetchcvs | ||
fetchdarcs | ||
fetchegg | ||
fetchfile | ||
fetchgit | ||
fetchgitlocal | ||
fetchgitrevision | ||
fetchhg | ||
fetchmtn | ||
fetchpatch | ||
fetchsvn | ||
fetchsvnrevision | ||
fetchsvnssh | ||
fetchurl | ||
fetchzip | ||
gcc-cross-wrapper | ||
gcc-wrapper-old | ||
grsecurity | ||
kdewrapper | ||
kernel | ||
libredirect | ||
make-desktopitem | ||
make-startupitem | ||
make-symlinks | ||
mono-dll-fixer | ||
native-darwin-cctools-wrapper | ||
nuke-references | ||
release | ||
rust | ||
setup-hooks | ||
src-only | ||
substitute | ||
substitute-files | ||
templaterpm | ||
upstream-updater | ||
vm | ||
vsenv | ||
build-pecl.nix | ||
replace-dependency.nix | ||
source-from-head-fun.nix | ||
trivial-builders.nix |