nixpkgs-mozilla icon indicating copy to clipboard operation
nixpkgs-mozilla copied to clipboard

Option to exclude documentation from rust installation?

Open werner291 opened this issue 3 years ago • 2 comments

Hello,

when installing a Rust toolchain, I get a lot of:

install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_mask_ternarylogic_epi64.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_maskz_cvtepi32_pd.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._bzhi_u32.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_maskz_srl_epi64.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm_max_epu16.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm_mask3_fnmsub_sd.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_maskz_fmaddsub_round_pd.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_mask_cmpge_epi16_mask.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/constant._MM_PERM_ADAB.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/constant._MM_PERM_BAAD.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_setzero.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm256_mask_packus_epi32.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_setr_pd.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm_fixupimm_sd.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm256_mask_min_epi16.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/constant._MM_EXCEPT_DENORM.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/constant._MM_PERM_ACAA.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._blcs_u32.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm_mask_slli_epi16.html
install: copying file /nix/store/ni24sz8yy3m5zz9danb56153yg078m2r-rust/share/doc/rust/html/core/arch/x86/fn._mm512_mul_pd.html

I kinda always use docs.rs, and the installation spends rather a lot of time (several minutes) installing those html files when I build a shell with rust.

Any option to skip this step?

werner291 avatar Mar 07 '21 15:03 werner291

There is none at the moment.

You can probably add an option as part of the postFixup phase: https://github.com/mozilla/nixpkgs-mozilla/blob/8c007b60731c07dd7a052cce508de3bb1ae849b4/rust-overlay.nix#L181

And transfer the installDoc option from: https://github.com/mozilla/nixpkgs-mozilla/blob/8c007b60731c07dd7a052cce508de3bb1ae849b4/rust-overlay.nix#L264 https://github.com/mozilla/nixpkgs-mozilla/blob/8c007b60731c07dd7a052cce508de3bb1ae849b4/rust-overlay.nix#L269

Such that it can be configured using latest.rustChannels.nightly.rust.override { installDoc = false; }

nbp avatar Mar 08 '21 18:03 nbp

See rust-lang/rust#80684 for the underlying problem causing rust-docs installation to take forever.

andersk avatar Apr 18 '21 04:04 andersk