Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixdoc: init at 1.0.1 #49353

Closed
wants to merge 1 commit into from
Closed

nixdoc: init at 1.0.1 #49353

wants to merge 1 commit into from

Conversation

tazjin
Copy link
Member

@tazjin tazjin commented Oct 28, 2018

Motivation for this change

Adds nixdoc, a tool to generate documentation for Nix functions in the
standard library.

See #49275 for some background information.

Note that the derivation used is generated by carnix and rather large, as there is no Rust package set in nixpkgs. This is similar to the derivation used for carnix itself, and way-cooler.

cc: @grahamc @jD91mZM2 @joachifm

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Adds nixdoc, a tool to generate documentation for Nix functions in the
standard library.

See NixOS#49275 for some background information.
@infinisil
Copy link
Member

@GrahamcOfBorg build nixdoc

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: nixdoc

Partial log (click to expand)

Running rustc --crate-name nixdoc src/main.rs --crate-type bin -C opt-level=3 -C codegen-units=1 --out-dir target/bin --emit=dep-info,link -L dependency=target/deps -L native=/nix/store/vxvhnmrgb54ld1lrw261cy173jyy02c1-rust_backtrace-sys-0.1.24/lib/backtrace-sys.out -l static=backtrace --extern failure=/nix/store/z1pa1ydkijikw6akzs6k4pi6r08yvk9i-rust_failure-0.1.3/lib/libfailure-e8bec5c242.rlib --extern rnix=/nix/store/v6nys1wfn2bw7qiqngcc1kkmnc9cis85-rust_rnix-0.4.1/lib/librnix-44636a2f86.rlib --extern structopt=/nix/store/lks6lg1nfb334bb90zjs143xc87v3v54-rust_structopt-0.2.12/lib/libstructopt-6cdd5a2706.rlib --extern xml=/nix/store/mh0z8a36nfkd64ngpwgz8mpld0ipqmv9-rust_xml-rs-0.8.0/lib/libxml-50e7b84675.rlib --cap-lints allow -L native=/nix/store/vxvhnmrgb54ld1lrw261cy173jyy02c1-rust_backtrace-sys-0.1.24/lib/backtrace-sys.out -l static=backtrace --color always
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/cq440dq9h8h45bd3s51s4b5p53y2j2x4-nixdoc-1.0.1
shrinking /nix/store/cq440dq9h8h45bd3s51s4b5p53y2j2x4-nixdoc-1.0.1/bin/nixdoc
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/cq440dq9h8h45bd3s51s4b5p53y2j2x4-nixdoc-1.0.1/lib  /nix/store/cq440dq9h8h45bd3s51s4b5p53y2j2x4-nixdoc-1.0.1/bin
patching script interpreter paths in /nix/store/cq440dq9h8h45bd3s51s4b5p53y2j2x4-nixdoc-1.0.1
checking for references to /build in /nix/store/cq440dq9h8h45bd3s51s4b5p53y2j2x4-nixdoc-1.0.1...
/nix/store/cq440dq9h8h45bd3s51s4b5p53y2j2x4-nixdoc-1.0.1

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: nixdoc

Partial log (click to expand)


trying https://crates.io/api/v1/crates/xml-rs/0.8.0/download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 50974  100 50974    0     0   103k      0 --:--:-- --:--:-- --:--:--  103k
unpacking source archive /build/xml-rs-0.8.0.tar.gz
cannot build derivation '/nix/store/2m3sxhzqss6dxv9ifs8v02walw44jrv2-rust_xml-rs-0.8.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/abrzkqz0c6fvdy19368mlfl06nz5j380-nixdoc-1.0.1.drv': 29 dependencies couldn't be built
error: build of '/nix/store/abrzkqz0c6fvdy19368mlfl06nz5j380-nixdoc-1.0.1.drv' failed

@Mic92
Copy link
Member

Mic92 commented Oct 28, 2018

I have changed it back to buildRustPackage to reduce the expression size (25 lines instead of 866 lines) Mic92@064f350

For Carnix I still want to see better sharing of nix expressions between packages to widely use it in nixpkgs.

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: nixdoc

Partial log (click to expand)

cannot build derivation '/nix/store/7zmhhqawjvxa72phpqlvzpds1rg5s98h-rust_quote-0.6.8.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/ip2c90aawj499xzma8gh3rz6k1ixvg7z-rust_syn-0.15.15.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/5s9vql1ya88gchww64fdr3gy7yqfs8p7-rust_structopt-derive-0.2.12.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/mfhxzn1yvq0bdwssc1d4zzgfdm6f4c2g-rust_synstructure-0.10.1.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/20pc6pdypk5pknm0gr3x30a8xc1h1qfp-rust_failure_derive-0.1.3.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/k13g4fhkaq9m0x8shwc5353d1ciw46i6-rust_structopt-0.2.12.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/myafi67zvdddbix9jva17b2xzh23pzgs-rust_failure-0.1.3.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/4s8dwd5v4wp0rvn8978kh9l7b2m7j4kp-rust_rnix-0.4.1.drv': 16 dependencies couldn't be built
cannot build derivation '/nix/store/0c5lvbv3012cl2hgwhi6xc9fcg3kccqd-nixdoc-1.0.1.drv': 28 dependencies couldn't be built
error: build of '/nix/store/0c5lvbv3012cl2hgwhi6xc9fcg3kccqd-nixdoc-1.0.1.drv' failed

@tazjin
Copy link
Member Author

tazjin commented Oct 28, 2018

@Mic92 Works for me! It looks like Hydra doesn't currently have rustc cached, so we'll have to ask for a build at some later time.

@Mic92
Copy link
Member

Mic92 commented Oct 28, 2018

I prefer #49275

@Mic92 Mic92 closed this Oct 28, 2018
@tazjin
Copy link
Member Author

tazjin commented Oct 28, 2018

@Mic92 Will you make a PR with your version? Or are you saying that you want the nixdoc package to go into #49275? I'd prefer to keep those separate atm, as they don't depend on each other.

@Mic92
Copy link
Member

Mic92 commented Oct 28, 2018

@tazjin I was confused by the UI. It looked like your other pull request contained my commit already, but It was just a reference.

@Mic92
Copy link
Member

Mic92 commented Oct 28, 2018

#49358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants