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

nixos/doc/manual: In the preface, add link to #chap-contributing #108481

Merged
merged 1 commit into from Jan 24, 2021

Conversation

attila-lendvai
Copy link
Contributor

Motivation for this change

it took me long minutes to find out where the sources are for this document.

Things done
  • in the preface i added a link to #chap-contributing

  • turned the freetext suggestion about opening the build output into a copy-pastable xdg-open line

  • renamed chapter title to 'Contributing to this manual'

  • tested the build on x86_64 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 nixpkgs-review --run "nixpkgs-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)

  • Ensured that relevant documentation is up to date

  • Fits CONTRIBUTING.md.

@@ -14,9 +14,6 @@ xlink:href="https://github.com/NixOS/nixpkgs">Nixpkgs</link> repository.
<screen>
<prompt>$ </prompt>cd /path/to/nixpkgs
<prompt>$ </prompt>nix-build nixos/release.nix -A manual.x86_64-linux
<prompt>$ </prompt>xdg-open ./result/share/doc/nixos/index.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if I like this change, since this would only work in Linux OS, and even them not all of them (not necessary everyone has xdg-open installed). macOS users are out of lucky.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thiagokokada well, this is the NixOS manual, and as such this is linux only. or do i misunderstand something here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my reasoning was that having something that works at most places, or can be made to work easily, is much better than not having something that can be easily copy-pasted.

otherwise it's just a relative path that the browser cannot even open in its URL bar when copy-pasted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, for example I could open in a browser terminal like Elinks (but my default browser is a graphical one). BTW, I said the part of macOS because someone maybe working in improving the NixOS manual from their macs.

I really prefer how it was before, because you don't have to assume anything about the user setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i'm new here, so i won't push this, i'll revert that part.

i still believe, though, that it's an improvement. people can still just ignore the xdg-open and copy-paste the ./result/ part, just like before.

and besides, the entire manual seems to be built assuming x86_64-linux in the previous line. that's much more platform dependent than the new xdg-open. it would be nice to get rid of that. e.g. by some uname -foo, or something like that. i was surprised by that when i first built the manual, but luckily it was matching my host.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another suggestion: replace xdg-open with [preferred browser].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i still believe, though, that it's an improvement. people can still just ignore the xdg-open and copy-paste the ./result/ part, just like before.

But now you're assuming that people know what xdg-open does. If they don't know that this is a "program to open files", they may even assume that this is something related to the manual build process.

another suggestion: replace xdg-open to [preferred browser].

I quite like how it is, it is very clear what is happening. Even preferred browser is not ideal considering some of the more strange setups out there (Emacs for example).

BTW, I am just a collaborator of some reviews here, my word is not final so if you want to keep xdg-open and wait for another reviewer it is fine too.

Copy link
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest of changes seems fine, but I would prefer if you reverted the xdg-open changes.

Turned the freetext suggestion about opening the build output
into a copy-pastable xdg-open line.

Renamed title to 'Contributing to this manual'.
@attila-lendvai
Copy link
Contributor Author

@thiagokokada ok, i've reverted the xdg-open part.

@attila-lendvai
Copy link
Contributor Author

@thiagokokada sorry about the repeated review request, it was by accident.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 22, 2021

@grahamc @jonringer could one of you take a look at this?

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@jonringer
Copy link
Contributor

ofborg built manual successfully

@jonringer jonringer merged commit 21c56fc into NixOS:master Jan 24, 2021
@jonringer
Copy link
Contributor

congrats @attila-lendvai on your first contribution to NixOS/nixpkgs 🎊

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

5 participants