1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
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 buildEnv to support passthru 2014-07-10 16:41:02 +02:00
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 Add Apple command-line tools 2014-10-02 06:50:09 +01:00
fetchbower
fetchbzr build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchcvs build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchdarcs fetchbzr, fetchdarcs, fetchhg: use rev attr 2014-06-28 21:06:10 +02:00
fetchegg Infrastructure to build chicken eggs. 2014-10-13 23:29:27 +02:00
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 build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchmtn
fetchpatch Patches for a lot of packages for GHC 7.10 2015-02-22 17:33:10 -08:00
fetchsvn build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
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 Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
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 Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
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 substituteAllFiles: add derivation 2014-10-16 15:27:25 +01:00
templaterpm Update: new features for nix-template-rpm 2015-02-06 20:12:57 +01:00
upstream-updater More support for SF.net in auto-updater 2014-09-02 14:25:16 +04:00
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 Exponentially reduce computation time needed for replace-dependency by using memoization. 2014-09-28 09:39:39 -04:00
source-from-head-fun.nix
trivial-builders.nix stdenv.lib -> lib 2014-10-27 10:25:35 +01:00