Hi!
I’m trying to understand what’s going on with appimage-run
to help resolve Incorrect timezone reported in logseq · Issue #217320 · NixOS/nixpkgs · GitHub . During my dive into the code, I found out that it makes use of chrootenv
to create an environment for the Filesystem Hierarchy Standard .
Unfortunately, the nixos manual chapter is sparse on details or references for me to understand what exactly is going on, so I tried to read the source code of chrootenv
which is very light on comments.
I’d like to setup developer environment that allows me to load the code into an editor with language server support (hx, vim, nvim, etc.) and:
- go to the source of symbols e.g
glib.h
,g_strv_contains
,va_start
, … - get documentation about the symbol (macro, function, variable, …) either
- in the editor (preferred but doesn’t work without docstrings)
- outside the editor with
man
(e.gman 2 mount
which doesn’t work atm) ordevhelp
(which doesn’t work either)
- modify the code to add comments and rename symbols (this works)
- compile it to make sure it still works (this works)
What I tried:
cd ./nixpkgs/pkgs/build-support/build-fhs-userenv/chrootenv
# start a shell with the dev dependencies?
nix-shell -E 'with import <nixpkgs> { }; callPackage ./default.nix {}'
# get information about
man 2 mount
# spit out error that it can't find the section on mount
$ nix-shell -p gnome.devhelp
[nix-shell:~]$ devhelp
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp2”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp2: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp2.gz”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp2.gz: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp.gz”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-en-gb-ise-wordlist.txt/hunspell-dict-en-gb-ise-wordlist.txt.devhelp.gz: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp2”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp2: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp2.gz”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp2.gz: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp.gz”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-fr-any-dicollecte.txt/hunspell-dict-fr-any-dicollecte.txt.devhelp.gz: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp2”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp2: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp2.gz”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp2.gz: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp: Not a directory
(devhelp:27157): devhelp-WARNING **: 20:30:40.276: Failed to read “/run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp.gz”: Fout bij het openen van bestand /run/current-system/sw/share/doc/hunspell-dict-nl-nl.txt/hunspell-dict-nl-nl.txt.devhelp.gz: Not a directory
Could not determine the accessibility bus address