mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
rust: update docs on legacyCargoFetcher; remove unnecessary defaults
As mentioned in #79975, the default on `legacyCargoFetcher` if left unspecified is now `false`.
This commit is contained in:
parent
ceb30c490c
commit
131a32a5af
@ -37,7 +37,6 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
cargoSha256 = "17ldqr3asrdcsh4l29m3b5r37r5d0b3npq1lrgjmxb6vlx6a36qh";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A fast line-oriented regex search tool, similar to ag and ack";
|
||||
@ -59,19 +58,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.
|
||||
|
||||
Setting `legacyCargoFetcher` to `false` enables the following behavior:
|
||||
|
||||
1. The `Cargo.lock` file is copied into the cargo vendor directory.
|
||||
2. At buildtime, `buildRustPackage` will ensure that the `src` and `cargoSha256`
|
||||
are consistent. This avoids errors where one but not the other is updated.
|
||||
3. The builder will compress the vendored cargo src directory into a tar.gz file
|
||||
for storage after vendoring, and decompress it before the build. This saves
|
||||
disk space and enables hashed mirrors for Rust dependencies.
|
||||
|
||||
Note that this option changes the value of `cargoSha256`, so it is currently
|
||||
defaulted to `false`. When updating a Rust package, please set it to `true`;
|
||||
eventually we will default this to true and update the remaining Rust packages,
|
||||
then delete the option from all individual Rust package expressions.
|
||||
Unless `legacyCargoFetcher` is set to `true`, the fetcher will also verify that
|
||||
the `Cargo.lock` file is in sync with the `src` attribute, and will compress the
|
||||
vendor directory into a tar.gz archive.
|
||||
|
||||
### Building a crate for a different target
|
||||
|
||||
|
@ -11,8 +11,6 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "06xqj83m4hz00p8796m0df7lv9875p8zc1v6l9yqbiak1h95lq7h";
|
||||
};
|
||||
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
cargoSha256 = "1pc4n6lm1w0660ivm0kxzicpckvb351y62dpv0cxa7ckd3raa5pr";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ] ++ stdenv.lib.optionals stdenv.isLinux [ python3 ];
|
||||
|
@ -15,8 +15,6 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "08i0zm7kgprixqjpgaxk7xid1njgj6lmi896jf9fsjqzdzlblqk8";
|
||||
};
|
||||
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
cargoSha256 = "0200apqbx769ggjnjr0m72g61ikhml2xak5n1il2pvfx1yf5nw0n";
|
||||
|
||||
cargoBuildFlags = [
|
||||
|
@ -12,7 +12,6 @@ rustPlatform.buildRustPackage {
|
||||
};
|
||||
|
||||
cargoSha256 = "06ghcd4j751mdkzwb88nqwk8la4zdb137y0iqrkpykkfx0as43x3";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
|
@ -17,8 +17,6 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoSha256 = "1z4cb7rcb7ldj16xxynrjh4hg872rj39rbbp0vy15kdp3ifyi466";
|
||||
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
buildInputs = with stdenv; lib.optional isDarwin Security;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -12,7 +12,6 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
cargoSha256 = "1fxajh1n0qvcdas6w7dy3g92wilhfldy90pyk3779mrnh57fa6n5";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Markdown shell pre-processor";
|
||||
|
@ -12,7 +12,6 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
cargoSha256 = "0zrwpmsrzwnjml0964zky8w222zmlargha3z0n6hf8cfshx23s4k";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
@ -12,7 +12,6 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
cargoSha256 = "16d1b3pamkg29nq80n6cbzc4zl9z3cgfvdxjkr2z4xrnzmkn1ysi";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Rust library for generating cryptocurrency wallets";
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkgconfig, cmake, curl, libiconv, darwin }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-tree";
|
||||
version = "0.29.0";
|
||||
@ -10,8 +11,6 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "16k41pj66m2221n1v2szir7x7qwx4i0g3svck2c8cj76h0bqyy15";
|
||||
};
|
||||
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
cargoSha256 = "0762gdj4n5mlflhzynnny1h8z792zyxmb4kcn54jj7qzdask4qdy";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig cmake ];
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform, nix, boost, graphviz, darwin }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nix-du";
|
||||
version = "0.3.1";
|
||||
@ -9,8 +10,8 @@ rustPlatform.buildRustPackage rec {
|
||||
rev = "v${version}";
|
||||
sha256 = "149d60mid29s5alv5m3d7jrhyzc6cj7b6hpiq399gsdwzgxr00wq";
|
||||
};
|
||||
|
||||
cargoSha256 = "1a6svl89dcdb5fpvs2i32i6agyhl0sx7kkkw70rqr17fyzl5psai";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ graphviz ];
|
||||
|
@ -20,7 +20,6 @@ rustPlatform.buildRustPackage rec {
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
cargoSha256 = "0rp4f6xnwmvf3pv6h0qwsg01jrndf77yn67675ac39kxzmrzfy2f";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator";
|
||||
|
@ -12,7 +12,6 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
cargoSha256 = "1m3ccp5ncafkifg8sxyxczsg3ja1gvq8wmgni68bgzm2lwxh2qgw";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tree command, improved";
|
||||
|
Loading…
Reference in New Issue
Block a user