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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Kitt3120
Copy link

@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.

@Kitt3120
Copy link
Author

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

@Kitt3120
Copy link
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
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
Copy link
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
Author

Kitt3120 commented May 8, 2024

Rebased the branch and resolved conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants