Repository navigation
fix: programs from split outputs & better command-not-found proposals - #49
Merged
Merged
Conversation
findutils ships locate & updatedb in a separate `locate` output, and util-linux ships mount & umount in a `mount` output: buildEnv only links the default outputs, so these were missing although their packages are built in. Add both outputs to the base packages. The program index maps programs to packages, not to outputs: the command-not-found handler offered to install the package already there, which then failed with "already installed". When any package providing the command is installed, explain the program lives in another output instead of prompting. Fixes #48
nixos-26.05 renamed fltk & fltk14 to fltk_1_4, fltk_1_4-minimal and fltk-minimal, so their ~140 demo programs with generic names were back in the index: `tree` offered to install fltk_1_4. Exclude any fltk* package.
The command-not-found handler proposed the first package providing the command in alphabetical order: wget offered toybox, python3 offered graalvmPackages.graalpy. Prefer the package named after the command, then packages whose name starts with it, and propose nested attributes and multi-call bundles (toybox, u-root-cmds, ...) last.
raphaelcoeffic
force-pushed
the
fix/issue-48-split-outputs
branch
from
November 28, 2026 07:05
4452cc6 to
1637f4b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #48.
Split outputs missing from the base image
findutilsshipslocate/updatedbin a separatelocateoutput, andutil-linuxshipsmount/umountin amountoutput.buildEnvonly links default outputs, so these were missing although their packages are built in. Both outputs are now part of the base packages (this changes the base image hash, so existing installs rebuild on upgrade).The program index maps programs to packages, not outputs, so the command-not-found handler offered to install the already-installed package, which then failed with "already installed". When any package providing the command is installed, the handler now explains the program lives in another output instead of prompting. This covers the remaining cases (
swapon,nologin,lastlog2,routel).Renamed fltk packages back in the program index
nixos-26.05 renamed
fltk/fltk14tofltk_1_4,fltk_1_4-minimalandfltk-minimal, which slipped past the exclusion list: ~140 demo programs with generic names were back in the index (treeofferedfltk_1_4). Anyfltk*package is now excluded.Ranking of proposed packages
The handler proposed the first candidate alphabetically. It now prefers, in order: the package named after the command, packages whose name starts with it, other top-level packages, and last nested attributes and multi-call bundles (
toybox,u-root-cmds, ...).wgettoyboxwgetpython3graalvmPackages.graalpypython311nodeelmPackages.nodejsnodejs-slimtracerouteinetutilstraceroutetreefltk_1_4treeTesting
cargo fmt --check,cargo clippy --all-targets,cargo test(new unit tests for the ranking)buildEnvfrom nixos-26.05 with the new attributes:locate,updatedb,mount,umountare linkedpkg _CmdNotFound <cmd>under a pty for ~50 commands against the regenerated index