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
utillinux: set default wordlist for look #34486
Conversation
I am not sure if it is necessary to add |
This adds a wrapper for `look` because it uses the environment variable 'WORDLIST', with a fallback to `/usr/share/dict/words` when looking for a dictionary.
I rebase this on to staging :) |
12e6f0d
to
ca31ed4
Compare
Strong 👎. |
Well, when I packaged `scowl`, I wanted a good dataset for everything that uses words.txt; should there be an override or a separate output for something much smaller? `wbritish.30` is around 100K, for example, whether it has enough coverage — depends on your needs.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a 36MB dependency to a derivation that is present on all NixOS systems with no real benefit is not acceptable IMHO. Additionally, at least, this wrapping should not be done when minimal
is true
.
Another option would be to add a module that sets the WORDLIST
environment variable to scowl
or a directory in /run/current-system
that would link all dict directories in environment.systemPackages
together, similar to shell completions. We could also patch look
to look there first instead of /usr
.
The expression now supports having `words.txt` in some place without tens and tens of megabytes of all the wordlist and spelling dictionaries. Set `singleWordlist` parameter to the string of region and size settings. For example: ``` scowl.override{singleWordlist = "en-gb-ise 60";} ``` Should be useful for NixOS#34486
OK, GitHub doesn't want to show it immediately, but in 00cafb4 I did add an option to install a single worldlist. The build it not optimised much for this case, though (I do skip building spelling dictionaries if they will not be installed). Edited to add: apparently, the best way to make the cross-reference show up already is to complain about it in a comment… |
Motivation for this change
change introduced in v2.31
(kernel.org version)
right now using look, without specifying a dictionary manually with the
-a
flag just results in the error:Things done
This adds a wrapper for
look
because it uses the environment variable'WORDLIST', with a fallback to
/usr/share/dict/words
when looking for a dictionary.build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)