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

inputmodule: init inputmodule-control (pkg), init inputmodule (module) #307293

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

Kitt3120
Copy link
Contributor

@Kitt3120 Kitt3120 commented Apr 27, 2024

Description of changes

This adds support for Framework input modules, like the LED matrix module.

I added an inputmodule-control pkg which builds the binary of the official CLI tool by Framework. It also provides udev rules when added to the list of udev packages, which allow for rootless access to input modules. The udev rules are also provided by Framework. It's fetched from GitHub using fetchFromGitHub and builds using buildRustPackage.

I additionally added a NixOS module that adds the option hardware.inputmodule.enable. Setting it to true adds inputmodule-control pkg to config.environment.systemPackages and config.services.udev.packages.

Repo: https://github.com/FrameworkComputer/inputmodule-rs

Release: https://github.com/FrameworkComputer/inputmodule-rs/releases/tag/v0.2.0

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.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Apr 27, 2024
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Apr 27, 2024
@Kitt3120
Copy link
Contributor Author

My vs code formatted the release notes file differently. Will fix this.

@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch from e087983 to 6c82060 Compare April 27, 2024 20:05
@Kitt3120
Copy link
Contributor Author

Fixed :)

@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch 2 times, most recently from 4a690de to ee044c6 Compare April 28, 2024 10:15
@Kitt3120
Copy link
Contributor Author

Kitt3120 commented Apr 28, 2024

Can anyone help me on the ofborg-eval check? I don't really get why it fails.

… while evaluating the attribute 'cargoDeps' of the derivation 'inputmodule-control-0.2.0'

Edit: Seems like I fixed it. I had to include the Cargo.lock file and reference it locally. Previously, I referenced it by ${src}/Cargo.lock, which worked locally but apparently caused problems with ofborg's check.

@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch 6 times, most recently from 53f69a9 to 7be99b1 Compare April 28, 2024 12:24
@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: 1-10 labels Apr 28, 2024
@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch from 7be99b1 to 40b25e0 Compare April 28, 2024 20:28
@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Apr 30, 2024
@Kitt3120
Copy link
Contributor Author

Kitt3120 commented May 3, 2024

Hey @Aleksanaa, I've seen your name show up often around here :) Would you mind taking a look at my PR?

Also, I'm new to the nixpkgs repo. Is it okay to ping for reviews? Or would my PR just get picked up soon anyway?

Edit: Okay, have some conflicts with upstream now, will resolve tomorrow.

@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch 2 times, most recently from 51a49f4 to 790a99b Compare May 8, 2024 18:32
@Kitt3120
Copy link
Contributor Author

Kitt3120 commented May 8, 2024

Rebased the branch and resolved conflicts

Edit: Have exams coming up. Will update this when I have some time again.

Edit 2: Updated again. Changelog moved from 24.05 to 24.11.

@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch from 790a99b to 4684629 Compare May 15, 2024 17:20
@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch 2 times, most recently from 0bf64cd to dcdb09b Compare May 22, 2024 17:46
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 13, 2024
@Kitt3120
Copy link
Contributor Author

Rebased

nixos/modules/hardware/inputmodule.nix Outdated Show resolved Hide resolved
nixos/doc/manual/release-notes/rl-2411.section.md Outdated Show resolved Hide resolved
pkgs/by-name/in/inputmodule-control/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/in/inputmodule-control/package.nix Outdated Show resolved Hide resolved
nixos/modules/hardware/inputmodule.nix Outdated Show resolved Hide resolved
@github-actions github-actions bot added 6.topic: python and removed 8.has: documentation This PR adds or changes documentation 8.has: changelog labels Sep 19, 2024
@Kitt3120 Kitt3120 requested a review from Aleksanaa September 19, 2024 13:32
@Kitt3120
Copy link
Contributor Author

Kitt3120 commented Sep 19, 2024

Thanks for the review! I included your suggestions.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 2, 2024
@Kitt3120
Copy link
Contributor Author

Kitt3120 commented Dec 3, 2024

I think ofborg is not a fan of this change. I'll try a rebase.

@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch from 6d7d25a to bddea67 Compare December 3, 2024 17:16
@FliegendeWurst
Copy link
Member

It might have been due to #354738 if it was the lib tests failing (can't see the failure anymore)

@Kitt3120
Copy link
Contributor Author

Kitt3120 commented Dec 3, 2024

It might have been due to #354738 if it was the lib tests failing (can't see the failure anymore)

yes, it was the lib test! Alright, then the rebase should do the trick.

@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 3, 2024
@Kitt3120 Kitt3120 force-pushed the inputmodule-control branch from bddea67 to 6cc4544 Compare December 12, 2024 21:58
@FliegendeWurst FliegendeWurst merged commit 7534f24 into NixOS:master Dec 13, 2024
25 of 26 checks passed
@Kitt3120 Kitt3120 deleted the inputmodule-control branch December 13, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: hardware 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 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: 1-10 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.

6 participants