1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-19 04:00:13 -04:00
Find a file
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
pills 03: nix-store: --tree and -R are mutually exclusive 2017-10-15 16:48:11 +03:00
.editorconfig initialize an editorconfig 2017-08-13 09:54:34 -04:00
.gitignore Travis support 2017-09-24 17:44:55 -04:00
.travis.yml Travis support 2017-09-24 17:44:55 -04:00
book.xml Fixed preface in book.xml 2017-08-16 19:33:16 -04:00
default.nix Add proper versioning 2017-08-19 10:56:31 -04:00
README.md Update README.md 2017-09-12 21:44:03 +08:00
release.nix Add proper versioning 2017-08-19 10:56:31 -04:00
style.css Initial commit of nix pills 2017-08-11 18:22:51 -04:00

When starting a new Pill, comment on the tracking issue which one you're doing. If you need help, ask there. If you make progress but don't finish in one go, make a PR anyway! I'm trying to not edit things as I go, in order to not get bogged down.

How I've built and tested:

nix-build release.nix && firefox result/share/doc/nix-pills/index.html

Emacs config for a nice docbook experience:

let
 pkgs = import <nixpkgs> {};
 inherit (pkgs) emacsPackagesNg docbook5 writeText;

 schemas = writeText "schemas.xml" ''
   <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
     <documentElement localName="section" typeId="DocBook"/>
     <documentElement localName="chapter" typeId="DocBook"/>
     <documentElement localName="article" typeId="DocBook"/>
     <documentElement localName="book" typeId="DocBook"/>
     <typeId id="DocBook" uri="${docbook5}/xml/rng/docbook/docbookxi.rnc" />
   </locatingRules>
 '';

in emacsPackagesNg.emacsWithPackages (epkgs: [
 (emacsPackagesNg.trivialBuild {
   pname = "nix-docbook-mode";
   version = "1970-01-01";
   src = writeText "default.el" ''
     (eval-after-load 'rng-loc
       '(add-to-list 'rng-schema-locating-files "${schemas}"))
     (global-set-key (kbd "<C-return>") 'nxml-complete)
   '';
 })
])

Then you can use the keys:

  • C-c C-b to finish & close a tag
  • C-c C-f to close a tag
  • C-return to auto-complete a tag or attribute.