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

g810-led: init at 0.4.2 #92119

Closed
wants to merge 1 commit into from
Closed

Conversation

samuelgrf
Copy link
Member

@samuelgrf samuelgrf commented Jul 3, 2020

Motivation for this change

Add g810-led package. It is an LED controller for Logitech keyboards and can be used to set custom colors for any keys and also supports multiple animated effects.

Things done

Built and tested with Logitech G910.
I also created a module for g810-led, which allows for setting a color profile via nixos configuration: #92124

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

@samuelgrf
Copy link
Member Author

@GrahamcOfBorg eval

@samuelgrf
Copy link
Member Author

@jonringer This needs a reviewer and I am not sure who to ping, can you suggest someone or take a look yourself?
Also, should I merge this pr with #92124 ?

@doronbehar
Copy link
Contributor

@GrahamcOfBorg eval

pkgs/misc/g810-led/default.nix Show resolved Hide resolved
ln -s \./g810-led $out/bin/g513-led
ln -s \./g810-led $out/bin/g610-led
ln -s \./g810-led $out/bin/g815-led
ln -s \./g810-led $out/bin/g910-led
Copy link
Contributor

Choose a reason for hiding this comment

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

Why ln -s and not cp? Or install?

Copy link
Member Author

Choose a reason for hiding this comment

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

So we don't waste space having the same binary multiple times, this is also how it's done in the original makefile: https://github.com/MatMoul/g810-led/blob/master/makefile

Copy link
Contributor

Choose a reason for hiding this comment

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

It would have been ideal if you'd patch upstream's makefile and make it use PREFIX properly and then use their makefile as is. The lines here are wrong:

https://github.com/MatMoul/g810-led/blob/5ee810a520f809e65048de8a8ce24bac0ce34490/makefile#L55-L74

They should use $(PREFIX) there instead of $(DESTDIR)/usr - and it's the default value of $(PREFIX) according to:

https://github.com/MatMoul/g810-led/blob/5ee810a520f809e65048de8a8ce24bac0ce34490/makefile#L13

Could you contact upstream about it?

pkgs/misc/g810-led/default.nix Outdated Show resolved Hide resolved
@samuelgrf
Copy link
Member Author

Closing because I am not using the package anymore and don't have the time to maintain it.

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

4 participants