Skip to content

kbd: split man & scripts outputs#417804

Merged
doronbehar merged 3 commits intoNixOS:stagingfrom
doronbehar:pkg/kbd
Jul 22, 2025
Merged

kbd: split man & scripts outputs#417804
doronbehar merged 3 commits intoNixOS:stagingfrom
doronbehar:pkg/kbd

Conversation

@doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Jun 18, 2025

Description of changes

A follow up to:

So cc @blitz, @drupol, @nikstur & @toastal.

Things done

  • Tested that the following likewise commands print the expected (only .scripts depends on bash): nix why-depends --precise --all -f. kbd.out bashInteractive.out
  • Tested bicon builds with this change applied on branch master (bicon depends directly on kbd, and building it doesn't require building many subsequent dependencies).
  • Built kbd on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@doronbehar doronbehar mentioned this pull request Jun 18, 2025
13 tasks
@nix-owners nix-owners bot requested a review from davidak June 18, 2025 11:17
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 8.has: documentation This PR adds or changes documentation labels Jun 18, 2025
@nikstur
Copy link
Contributor

nikstur commented Jun 18, 2025

I don't think this is what we want. Without being sure, I assume we actually want most of the binaries to be in the default output. This way you wouldn't get any of the binaries if you just pull in the package, right

Maybe we could introduce a new scriptBin that includes just the scripts as an alternative solution.

@doronbehar
Copy link
Contributor Author

Thanks for commenting @nikstur. Indeed there are at least 9 usages of kbd binaries in Nixpkgs that are relevant:

$ git grep -w 'kbd}'/bin
nixos/modules/config/console.nix:              "${config.boot.initrd.systemd.package.kbd}/bin/setfont"
nixos/modules/config/console.nix:              "${config.boot.initrd.systemd.package.kbd}/bin/loadkeys"
nixos/tests/kbd-setfont-decompress.nix:    assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.gz  2>&1") == ""
nixos/tests/kbd-setfont-decompress.nix:    assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.bz2 2>&1") == ""
nixos/tests/kbd-setfont-decompress.nix:    assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.xz  2>&1") == ""
nixos/tests/kbd-setfont-decompress.nix:    assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.zst 2>&1") == ""
nixos/tests/kbd-update-search-paths-patch.nix:    command = "${pkgs.kbd}/bin/setfont ter-112n 2>&1"
pkgs/os-specific/linux/systemd/default.nix:      (lib.mesonOption "loadkeys-path" "${kbd}/bin/loadkeys")
pkgs/os-specific/linux/systemd/default.nix:      (lib.mesonOption "setfont-path" "${kbd}/bin/setfont")

And 3 of these binaries - setfont, loadkeys & kbd_mode are required in console.nix and systemd which are pulled in every system. Meaning a dedicated output just for unicode scripts is a better idea - achieving the main goal of this PR, and it is now implemented.

@doronbehar doronbehar changed the title kbd: split bin & man outputs kbd: split man & unicodeScripts outputs Jun 20, 2025
@wolfgangwalther
Copy link
Contributor

(fixing CI after eval fix made it into staging)

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 25, 2025
@doronbehar
Copy link
Contributor Author

Thanks for your reviews! I addressed all issues and fixed merge conflict.

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 26, 2025
@doronbehar doronbehar requested review from blitz and nikstur June 29, 2025 12:59
@doronbehar doronbehar changed the title kbd: split man & unicodeScripts outputs kbd: split man & scripts outputs Jun 29, 2025
@doronbehar
Copy link
Contributor Author

Due to no further objections, I'd like to merge this in a few days, please comment if you'd have anything last to say.

@doronbehar doronbehar merged commit 2b2bbb2 into NixOS:staging Jul 22, 2025
28 of 29 checks passed
@doronbehar doronbehar deleted the pkg/kbd branch February 10, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants