1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-19 04:00:13 -04:00
Commit graph

5 commits

Author SHA1 Message Date
Ulya Trofimovich abb593509e Make command output coherent with its text description.
Command 'nix-store -q --referrers `which hello`' should list two
environments as described in the text: "Two environments were listed..."
Add a second environment and a manifest to the command output (hashes
were taken from the command output when trying to replay pill 3 steps on
a local system).
2021-10-20 15:56:25 +01:00
Amy de Buitléir dac4f17468 Indicate that there is additional output not shown 2018-12-10 00:46:39 +00:00
Maximilian Bosch bcea6b35ed
Update documentation after Nix 2.0 switch
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
2018-12-08 00:10:40 +01:00
Anton Latukha a95d1bbf9c 03: nix-store: --tree and -R are mutually exclusive
In current NixOS 17.09,
Current version of `nix-store` command does not accept command as possible one:
```shell
$ nix-store -qR --tree $(command -s man)
error: query type ‘--tree’ conflicts with earlier flag
Try ‘nix-store --help’ for more information.
```

So, `--tree` and `-R` are mutually exclusive options. 
```shell
$ nix-store -q --tree (command -s nix-store)                                                                                                                                                   (1)
/nix/store/b8xy8bdxh1r5yjda332qrxj1vvvsy4fq-nix-1.11.15
+---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
+---/nix/store/gpbdiwg2mg21kppj12y019is5r0f8cgn-sqlite-3.20.0
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   +---/nix/store/gpbdiwg2mg21kppj12y019is5r0f8cgn-sqlite-3.20.0 [...]
+---/nix/store/vp8y0rh8rq7vikbbrpf28jfym79xq9z8-coreutils-8.28
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   +---/nix/store/icxr8r6g584a3rhzixjs4zwwscssjr4c-attr-2.4.47
|   |   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   |   +---/nix/store/icxr8r6g584a3rhzixjs4zwwscssjr4c-attr-2.4.47 [...]
|   +---/nix/store/47ba88rwcima20wkw3j6r9i5nf4yxjmy-acl-2.2.52
|   |   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   |   +---/nix/store/icxr8r6g584a3rhzixjs4zwwscssjr4c-attr-2.4.47 [...]
|   |   +---/nix/store/47ba88rwcima20wkw3j6r9i5nf4yxjmy-acl-2.2.52 [...]
|   +---/nix/store/vp8y0rh8rq7vikbbrpf28jfym79xq9z8-coreutils-8.28 [...]
+---/nix/store/sbmxzfdnnl99jdhfsx4wasbcx6v7r0a2-perl-5.24.2
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   +---/nix/store/vp8y0rh8rq7vikbbrpf28jfym79xq9z8-coreutils-8.28 [...]
|   +---/nix/store/sbmxzfdnnl99jdhfsx4wasbcx6v7r0a2-perl-5.24.2 [...]
+---/nix/store/i75adw8s20flph7wvhffma1is26llh2y-perl-DBI-1.636
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   +---/nix/store/sbmxzfdnnl99jdhfsx4wasbcx6v7r0a2-perl-5.24.2 [...]
|   +---/nix/store/i75adw8s20flph7wvhffma1is26llh2y-perl-DBI-1.636 [...]
+---/nix/store/4qsl6n0a51vb3b6w9ncppk7il62qchgy-perl-DBD-SQLite-1.50
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   +---/nix/store/gpbdiwg2mg21kppj12y019is5r0f8cgn-sqlite-3.20.0 [...]
|   +---/nix/store/i75adw8s20flph7wvhffma1is26llh2y-perl-DBI-1.636 [...]
|   +---/nix/store/4qsl6n0a51vb3b6w9ncppk7il62qchgy-perl-DBD-SQLite-1.50 [...]
+---/nix/store/9bmbvrlmcq58sw1z4q58iyfrsnbzy3db-libseccomp-2.3.2
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   +---/nix/store/9bmbvrlmcq58sw1z4q58iyfrsnbzy3db-libseccomp-2.3.2 [...]
+---/nix/store/ybajdccj1h5xssna16h6vv3qqda6m7l4-openssl-1.0.2l
|   +---/nix/store/xzx1bv1d7z4mgg6sg6ly0jx609qvka4x-glibc-2.25-49 [...]
|   +---/nix/store/ybajdccj1h5xssna16h6vv3qqda6m7l4-openssl-1.0.2l [...]
```

So `nix-store -q --tree (command -s nix-store)` is the right command.
2017-10-15 16:48:11 +03:00
Justin Wood 29ad2bc0de
Port pill #3 2017-08-12 22:13:47 -04:00