Closed LoganBarnett closed 11 months ago
There is currently no CLI for fenix, so you would need to manually open the html file or write your wrapper. The book is in share/doc/rust/html/book/index.html
of the rust-docs
component, so you can either use just the component itself or with the toolchain you created with withComponents
Thanks so much! That's the missing piece I needed.
For posterity, I used fd
to find the package in my nix store. There were actually quite a few matches, but I just took the first dir that showed up.
Example:
$ fd rust-docs /nix/store
/nix/store/p3f6gyn7lcmxpplvs4yd0fyjyh5la0rr-rust-docs-nightly-complete-2023-03-03/
/nix/store/gbrrv2fxgp7pb1hfnd23bvjmrkrcmlfs-rust-docs-nightly-default-2023-03-03.drv
/nix/store/bjzjg8451qzap2fj6gim92bpx5v4c7ah-rust-docs-nightly-x86_64-apple-darwin.tar.gz.drv
/nix/store/s6ac37206z94f7lp7207nx9jmcw9rya7-rust-docs-nightly-complete-2023-07-18.drv
/nix/store/ji2ncgziys0ynkggfncqn5zw6482ckdi-rust-docs-nightly-default-2023-03-03/
/nix/store/4fl71cyh75lszmh1dnwzrzfwb6wk8y3f-rust-docs-nightly-x86_64-apple-darwin.tar.gz
/nix/store/v14kwi8glwc4xvryfqvj3sy4nay7i5ca-rust-docs-nightly-default-2023-07-18/
/nix/store/791h39cfbgi06m3mimy2ymd6fc04bhhf-rust-docs-nightly-complete-2023-07-18/
/nix/store/0nxsralp42vi3dqkfkfry5f6zzswic2v-rust-docs-nightly-complete-2023-03-03.drv
/nix/store/bf5k7c5xkihb3c1x2s3arnfchnsmhfn3-rust-docs-nightly-x86_64-apple-darwin.tar.gz.drv
^C
Then append the path @figsoda provided to the end of that, and on macOS, it's just open
. I forget what the X windows equivalent is in Linux.
$ open /nix/store/p3f6gyn7lcmxpplvs4yd0fyjyh5la0rr-rust-docs-nightly-complete-2023-03-03/share/doc/rust/html/book/index.html
Since this is all I need, I'm closing this ticket. Thanks again!
When I have
rustup
installed as its own package (fenix
doesn't seem to supply it?) I get this outcome when trying to bring up the docs:However when I remove
rustup
(sincefenix
is trying to be arustup
replacement), I don't haverustup
available at all. I do think I have the right component(s) added. How should I go about doing an equivalent ofrustup doc --book
?This is my overlay:
In my packages list:
I don't necessarily need
complete
or any other toolchain as far as I know - I'm just trying to rule out overly aggressive pruning that might remove what I'm trying to add.Thanks for all the work on this project!
Edit: The hash suddenly became relevant again, fixed to reflect that. Should be immaterial to the ticket though :)