diff options
author | zimbatm <zimbatm@zimbatm.com> | 2019-08-24 14:29:47 +0200 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2019-09-30 17:09:52 +0000 |
commit | f8d67ec135de10ac16fcc0c1623c911a4783775f (patch) | |
tree | 180510ea6ee17ce0fe14d10d69569f3ef81d55bc /doc/languages-frameworks | |
parent | 98ddcfe794b28a1fa89d544f9efa3783b7835a0f (diff) |
buildRustPackage: add verifyCargoDeps option
One issue with cargoSha256 is that it's hard to detect when it needs to be updated or not. It's possible to upgrade a package and forget to update cargoSha256 and run with old versions of the program or libraries. This commit introduces `verifyCargoDeps` which, when enabled, will check that the Cargo.lock is not out of date in the cargoDeps by comparing it with the package source.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/rust.section.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 2d9338f2e89bf..83b7b159bd63d 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -43,6 +43,7 @@ rustPlatform.buildRustPackage rec { }; cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx"; + verifyCargoDeps = true; meta = with stdenv.lib; { description = "A fast line-oriented regex search tool, similar to ag and ack"; @@ -64,6 +65,9 @@ When the `Cargo.lock`, provided by upstream, is not in sync with the added in `cargoPatches` will also be prepended to the patches in `patches` at build-time. +When `verifyCargoDeps` is set to `true`, the build will also verify that the +`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future. + ## Compiling Rust crates using Nix instead of Cargo ### Simple operation |