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

openrazer: init at 2.6.0 #64552

Merged
merged 5 commits into from Sep 3, 2019
Merged

openrazer: init at 2.6.0 #64552

merged 5 commits into from Sep 3, 2019

Conversation

@evanjs
Copy link
Member

evanjs commented Jul 10, 2019

Motivation for this change

Picking up on #47009
It would be nice to be able to configure Razer stuff from NixOS, etc

Things done
  • Kernel drivers for talking to Razer products (keyboards, mice, etc.)
  • Daemon for talking to the kernel drivers.
  • Python library for talking to the daemon.
  • NixOS module hardware.openrazer which adds the kernel drivers and
    daemon to a system.
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

One question, though:
As this is in place of another PR that went silent, should I edit maintainers and just add myself? Not sure what the proper route is.

@alexarice

This comment has been minimized.

Copy link
Contributor

alexarice commented Jul 10, 2019

Whatever the situation with the maintainer is, the addition to maintainers.nix should probably be a separate commit. OfBorg is saying there is some error in the meta though I couldn't see it straight away

Copy link
Member

FRidh left a comment

Comments made in the other PR need to be addressed.

@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Jul 10, 2019

Comments made in the other PR need to be addressed.

Oops! Must've resolved the wrong commit.

To confirm: Do I need to rewrite all openrazer expressions in all-packages and python-packages to be under pkgs/development/python-modules/*, or just those in python-packages?

@evanjs evanjs force-pushed the evanjs:feature/openrazer-2.3.1 branch from afcdd42 to 8a3e594 Jul 10, 2019
nixos/modules/hardware/openrazer.nix Outdated Show resolved Hide resolved
nixos/modules/hardware/openrazer.nix Outdated Show resolved Hide resolved
nixos/modules/hardware/openrazer.nix Outdated Show resolved Hide resolved
nixos/modules/hardware/openrazer.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/openrazer/daemon.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Show resolved Hide resolved
pkgs/development/python-modules/openrazer/daemon.nix Outdated Show resolved Hide resolved
'';

postBuild = ''
DESTDIR="$out" PREFIX="" make manpages

This comment has been minimized.

Copy link
@Infinisil

Infinisil Jul 16, 2019

Member

Both this and above make command make more sense in buildPhase, because it's really the thing that builds it, not some pre/post action

This comment has been minimized.

Copy link
@evanjs

evanjs Jul 21, 2019

Author Member

Between the rejected patch and postBuild, I was unable to get this working within the normal buildPhase. Any other thoughts on what might work?

pkgs/development/python-modules/openrazer/daemon.nix Outdated Show resolved Hide resolved
@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Jul 18, 2019

Pretty much all the aforementioned changes have been made, thanks!

The one blocker I have right now is the kernel module, and how to access the src submodule if part of this is being moved to python-modules (per @FRidh)

That, and I'm still sort of new to modules and not sure how to deal with kernelPackages.
e.g. error: attribute 'openrazer' missing

context: boot.extraModulePackages = [ config.boot.kernelPackages.openrazer ];

Though I'm assuming this is related to the split between python-modules and os-specific/linux.

@Infinisil

This comment has been minimized.

Copy link
Member

Infinisil commented Jul 18, 2019

Forgot to push? Because I can't see any changes :)

@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Jul 18, 2019

Forgot to push? Because I can't see any changes :)

Yeah, I thought about that after I posted 😀
I discovered linuxPackagesFor, anyway, and I was able to configure and rebuild with openrazer enabled.

Going to look it over once more and push for further review.

@evanjs evanjs force-pushed the evanjs:feature/openrazer-2.3.1 branch from 8a3e594 to 8473f92 Jul 19, 2019
@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Jul 27, 2019

Comments made in the other PR need to be addressed.

@FRidh Still a little lost on how this needs to be split between os-specific and python-modules; Please let me know if I need to change anything else related to the paths.

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@evanjs evanjs force-pushed the evanjs:feature/openrazer-2.3.1 branch from c509555 to 4624af7 Aug 28, 2019
Copy link
Member

Infinisil left a comment

I think the changes look mostly good, but now the commit history should be cleaned up: an initial commit for adding the maintainer (which is okay with being added I hope), then a separate commit for each package, and a final one for the NixOS module

maintainers/maintainer-list.nix Show resolved Hide resolved
@evanjs evanjs force-pushed the evanjs:feature/openrazer-2.3.1 branch from 6cb967b to 872b9b1 Aug 29, 2019
@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Aug 29, 2019

I think the changes look mostly good, but now the commit history should be cleaned up: an initial commit for adding the maintainer (which is okay with being added I hope), then a separate commit for each package, and a final one for the NixOS module

Otherwise, I can just add myself, and add them if they ask in the future 🤷‍♂

@evanjs evanjs force-pushed the evanjs:feature/openrazer-2.3.1 branch from 872b9b1 to cf39c8f Aug 29, 2019
@evanjs evanjs mentioned this pull request Aug 29, 2019
@z3ntu

This comment has been minimized.

Copy link

z3ntu commented Aug 29, 2019

Maybe it would be beneficial to update this PR to v2.6.0?

@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Aug 30, 2019

Maybe it would be beneficial to update this PR to v2.6.0?

Without any changes outside of removing the patch that was merged since 2.3.1, 2.6.0 seems to work fine without any other changes.

@Infinisil @FRidh Is bumping like this during PRs okay?

@Infinisil

This comment has been minimized.

Copy link
Member

Infinisil commented Aug 30, 2019

Sounds fine to me, assuming you'll test the new version as well. I'd be fine without a bump too though, can always be updated later, and any package is better than none.

@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Aug 30, 2019

Sounds fine to me, assuming you'll test the new version as well. I'd be fine without a bump too though, can always be updated later, and any package is better than none.

Sounds good. Bumped and rebased using the commit order @Infinisil requested and building once more to make sure it still runs. Building on master is fun 😴

@evanjs evanjs force-pushed the evanjs:feature/openrazer-2.3.1 branch from cf39c8f to e9b167b Aug 30, 2019
@evanjs evanjs changed the title openrazer: init at 2.3.1 openrazer: init at 2.6.0 Aug 30, 2019
@evanjs

This comment has been minimized.

Copy link
Member Author

evanjs commented Aug 30, 2019

Okay, everything has been tested once more and verified running on 2.6.0, systemctl status, modinfo razerkbd, etc.
Please let me know if there is anything else you guys can think of.
Thanks again for the reviews!

@disassembler

This comment has been minimized.

Copy link
Member

disassembler commented Aug 31, 2019

This looks good to me. @Infinisil @FRidh any additional requests or can this be merged?

Copy link
Member

Infinisil left a comment

LGTM

@Infinisil Infinisil merged commit ce944b4 into NixOS:master Sep 3, 2019
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@evanjs evanjs deleted the evanjs:feature/openrazer-2.3.1 branch Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.