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

Update documentation after Nix 2.0 switch #90

Merged
merged 1 commit into from Dec 8, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Dec 6, 2018

In #89 it has been reported that the third step can't be done as
nix-repl doesn't evaluate anymore on 18.09 and unstable as in both
cases an evaluation error will be thrown.

First of all this may confuse new users who want to learn Nix, but don't
know the ecosystem sufficiently to understand why the install failed.

As recent NixOS versions (unstable and 18.09) use Nix 2.0 by default and
unstable doesn't evaluate with Nix 1.x anymore it should be a safe thing
to do now.

This patch covers two aspects:

  • Using Nix 2.0: I replayed the installation steps with nix-env to
    ensure that the steps and explanations provided in the first three
    chapters are still valid.

  • Replacing nix-repl references: most of the cases it was sufficient
    to replace nix-repl with the newly introduced command nix repl.
    In chapter three nix-repl was used to demonstrate the installation
    of a package with nix-env. I decided to use nix-index as demo
    package as I figured this tool to be extremely helpful to locate
    packages by output files.

    The explanation that Nix is not only a tool for package/derivation
    management, but a functional language as well was moved to chapter
    four where the basics of the language were actually covered.

This change is just a first step towards an updated series, in the
future we may want to use even more Nix 2.0 features (such as
nix-build vs. nix build with nix log).

Fixes #89
Possibly supersedes #71

pills/03-enter-environment.xml Outdated Show resolved Hide resolved
In NixOS#89 it has been reported that the third step can't be done as
`nix-repl` doesn't evaluate anymore on 18.09 and unstable as in both
cases an evaluation error will be thrown.

First of all this may confuse new users who want to learn Nix, but don't
know the ecosystem sufficiently to understand why the install failed.

As recent NixOS versions (unstable and 18.09) use Nix 2.0 by default and
unstable doesn't evaluate with Nix 1.x anymore it should be a safe thing
to do now.

This patch covers two aspects:

* Using Nix 2.0: I replayed the installation steps with `nix-env` to
  ensure that the steps and explanations provided in the first three
  chapters are still valid.

* Replacing `nix-repl` references: most of the cases it was sufficient
  to replace `nix-repl` with the newly introduced command `nix repl`.
  In chapter three `nix-repl` was used to demonstrate the installation
  of a package with `nix-env`. I decided to use `nix-index` as demo
  package as I figured this tool to be extremely helpful to locate
  packages by output files.

  The explanation that Nix is not only a tool for package/derivation
  management, but a functional language as well was moved to chapter
  four where the basics of the language were actually covered.

This change is just a first step towards an updated series, in the
future we may want to use even more Nix 2.0 features (such as
`nix-build` vs. `nix build` with `nix log`).

Fixes NixOS#89
Possibly supersedes NixOS#71
@Ma27
Copy link
Member Author

Ma27 commented Dec 8, 2018

@grahamc as you've been working a lot on the NixOS documentation, would you mind having a look at this? :)

@grahamc
Copy link
Member

grahamc commented Dec 8, 2018 via email

@Ma27
Copy link
Member Author

Ma27 commented Dec 8, 2018

Yes I do :)

@Ma27 Ma27 merged commit c5c14aa into NixOS:master Dec 8, 2018
@Ma27 Ma27 deleted the update-docs-for-nix-2.0 branch December 8, 2018 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants