nixpkgs/pkgs/build-support
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
..
agda agda: migrate to haskell-ng, update and cleanup 2015-04-06 21:24:33 +02:00
autonix autonix: allow one-to-many dependency resolution 2015-03-08 17:28:44 -05:00
build-fhs-chrootenv chroot-env: add locales, refactor environment 2015-03-09 17:29:43 +03:00
build-fhs-userenv fhs-userenv: Make it work on kernel < 3.19 cc @abbradar 2015-03-10 18:12:38 +01:00
buildenv
builder-defs Support unraring source files 2015-03-27 15:36:26 -07:00
cabal ghcjs: support for Haskell-NG 2015-03-29 03:34:04 +02:00
cc-wrapper Rename ccgo back to gccgo 2015-03-27 12:45:32 +02:00
dotnetenv Remove executable bits from non-executable files 2015-01-27 18:54:38 +01:00
emacs refactor Emacs packages'/modes' builders 2015-03-03 16:02:15 +00:00
fetchadc
fetchbower
fetchbzr
fetchcvs
fetchdarcs
fetchegg
fetchfile
fetchgit Add support for building cargo'ed Rust programs 2015-04-21 19:46:29 +02:00
fetchgitlocal fetchgitlocal: use output of git show and git diff to tell nix whether the source has changed. 2015-03-31 20:00:00 -07:00
fetchgitrevision
fetchhg
fetchmtn
fetchpatch Patches for a lot of packages for GHC 7.10 2015-02-22 17:33:10 -08:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl Get rid of fetchurlGnome 2015-04-04 22:22:12 -07: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 grsecurity module: use types.enum 2015-04-03 13:45:45 +02:00
kdewrapper
kernel makeInitrd: Support prepending other initrds 2015-03-25 14:14:46 -07:00
libredirect libredirect: add access syscall 2015-01-20 18:52:37 +01:00
make-desktopitem
make-startupitem
make-symlinks
mono-dll-fixer
native-darwin-cctools-wrapper
nuke-references
release clang-analyzer: align attrname with pkgname 2015-02-20 22:30:51 +01:00
rust buildRustPackage: Fix Cargo.lock being ignored 2015-04-23 02:58:07 +02:00
setup-hooks Revert "fix-darwin-dylib-names: Fix all outputs" 2015-03-24 16:27:54 +01:00
src-only
substitute
substitute-files
templaterpm Update: new features for nix-template-rpm 2015-02-06 20:12:57 +01:00
upstream-updater
vm fillDiskWithRPMs: Pass --extract-over-symlinks to cpio 2015-02-27 14:00:11 +01:00
vsenv
build-pecl.nix fix phpPackages memcache,memcached,xdebug 2015-02-05 20:28:16 +01:00
replace-dependency.nix
source-from-head-fun.nix
trivial-builders.nix