Skip to content
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

zenergy: init at 0-unstable-2024-10-10 #297598

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

wizardlink
Copy link
Member

Description of changes

Adds a new kernel module, zenergy, this is necessary for accessing CPU power draw data without root permission, specifically MangoHud requires it to be able to show the user their CPU power draw.

Things done

  • Built 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)
    • sandbox = relaxed
    • sandbox = true
  • 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.05 Release Notes (or backporting 23.05 and 23.11 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.

@wizardlink
Copy link
Member Author

wizardlink commented Mar 21, 2024

I apologize if I missed something in advance, first time contributing to the repository! I am a little confused though with the testing and release note markdown, for the testing I couldn't find an example of a kernel module being tested, if it's even possible with the suite available; whereas the markdown file, it implies that not all additions will be covered, so would this PR be applicable still? Not quite sure.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Mar 21, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100 labels Mar 21, 2024
@wizardlink wizardlink mentioned this pull request Jun 13, 2024
13 tasks
pkgs/os-specific/linux/zenergy/default.nix Outdated Show resolved Hide resolved
pkgs/os-specific/linux/zenergy/default.nix Outdated Show resolved Hide resolved
Comment on lines 30 to 36
installPhase = ''
make modules_install KDIR=${kernelDirectory}
'';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be enough to set makeTarget and makeFlags like already done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched in the repository for examples and tried to replicate, but in the installPhase the KDIR environment wasn't set on top of not running modules_install with makeTargets = [ "modules_install" ].

Am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SuperSandro2000 can you also give me an update on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

installTargets = [ "modules_install" ]; works

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the heads-up! Can't believe I hadn't noticed that in the docs.

pkgs/os-specific/linux/zenergy/default.nix Outdated Show resolved Hide resolved
@SuperSandro2000
Copy link
Member

I am a little confused though with the testing and release note markdown, for the testing I couldn't find an example of a kernel module being tested, if it's even possible with the suite available; whereas the markdown file, it implies that not all additions will be covered, so would this PR be applicable still? Not quite sure.

If you are doing the change on top of nixos-unstable, you can just rebuild your system with it and try to use the kernel module like normally done.
We don't need a release note entry here.

@wizardlink
Copy link
Member Author

wizardlink commented Jun 13, 2024

I've been using that kernel module locally since the PR has been open, so I can attest that it's in working condition!

I'll be adjusting for the review ASAP. o7

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jun 15, 2024
@wizardlink wizardlink changed the title zenergy: init at a3e1244 zenergy: init at d65592b Jun 15, 2024
@SuperSandro2000 SuperSandro2000 changed the title zenergy: init at d65592b zenergy: init at 0-unstable-2024-05-19 Jun 26, 2024
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 10, 2024
@Artturin Artturin self-assigned this Oct 23, 2024
@Artturin Artturin self-requested a review October 23, 2024 04:07
@wizardlink wizardlink changed the title zenergy: init at 0-unstable-2024-05-19 zenergy: init at 0-unstable-2024-10-10 Oct 24, 2024
@anthonyroussel anthonyroussel mentioned this pull request Oct 24, 2024
13 tasks
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 24, 2024
@Artturin Artturin merged commit b8c13d3 into NixOS:master Oct 25, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants