Skip to content

linuxPackages.btf: init - #484057

Closed
artemist wants to merge 1 commit into
NixOS:masterfrom
obsidiansystems:vmlinux-h
Closed

artemist wants to merge 1 commit into
NixOS:masterfrom
obsidiansystems:vmlinux-h

Conversation

@artemist

Copy link
Copy Markdown
Member

Things done

Add a new linuxPackages.btf package that includes the given kernel's btf-generated vmlinux.h. Some packages, such as systemd, require a kernel's data structures and functions generated from btf for full functionality.

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Jan 26, 2026
@alyssais

Copy link
Copy Markdown
Member

Add a new linuxPackages.btf package that includes the given kernel's btf-generated vmlinux.h. Some packages, such as systemd, require a kernel's data structures and functions generated from btf for full functionality.

The systemd case has been extensively discussed (both in #404864 and on Matrix) and it sounds like a solution is possible that does not require packaging vmlinux.h files for particular kernel versions that may not be portable to other kernel versions at runtime. Hopefully the upstream systemd contribution mentioned in the linked thread materialises soon.

@artemist

Copy link
Copy Markdown
Member Author

Seems I neglected to search before writing this, I'll look over the discussion

@artemist

Copy link
Copy Markdown
Member Author

I suppose the question is whether we want to merge that PR before we find a better solution by modifying systemd.

I am working on allocating users for nix builds with nsresourced, and not having nsresourced working in nixpkgs would make the change substantially less useful.

@Ericson2314

Copy link
Copy Markdown
Member

I am hoping as long as we are not polluting existing packages / everything is opt-in, it will be OK for now. Ideally more Nix community usage of this feature will help get more people interested in making the upstream change (discussed in the other thread) happen.

@alyssais

alyssais commented Jan 26, 2026 via email

Copy link
Copy Markdown
Member

@Ericson2314

Copy link
Copy Markdown
Member

Well, if it kinda mostly work, that would remove the incentive, if it was a popular feature but one that that required tons of rebuilding, that would increase the incentive.

@nixpkgs-ci
nixpkgs-ci Bot requested a review from zowoq January 30, 2026 17:58
@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team February 10, 2026 17:20
@artemist artemist closed this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants