-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
bucklespring: init at 2021-01-21 #110454
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
bucklespring: init at 2021-01-21 #110454
Conversation
, libX11 | ||
}: | ||
|
||
with lib; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use with lib over the entire scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not going to add lib.
in front of every optionals
, that's ugly
but using it at meta is redundant xD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's how we usually do it in nixpkgs and using with lib over the entire file is way uglier than repeating lib a few times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with should always be used over the smallest scope possible and not over everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to inherit optionals from lib
but did reintroduce with lib;
at meta
with lib; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with lib; |
++ optionals (legacy) [ libXtst libX11 ] | ||
++ optionals (!legacy) [ libinput ]; | ||
|
||
makeFlags = optionals (!legacy) [ "libinput=1" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ optionals (legacy) [ libXtst libX11 ] | |
++ optionals (!legacy) [ libinput ]; | |
makeFlags = optionals (!legacy) [ "libinput=1" ]; | |
++ lib.optionals (legacy) [ libXtst libX11 ] | |
++ lib.optionals (!legacy) [ libinput ]; | |
makeFlags = lib.optionals (!legacy) [ "libinput=1" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
, libX11 | ||
}: | ||
|
||
with lib; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with should always be used over the smallest scope possible and not over everything.
added a |
let | ||
inherit (lib) optionals; | ||
in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let | |
inherit (lib) optionals; | |
in |
d94a61e
to
e2e95db
Compare
Mind fixing up the commit message and PR title to match? Then I think this is good to go. |
right, done |
Motivation for this change
clickety clack keyboard's cool
Things done
packaged a tool to produce buckling spring keyboard sounds on keyboard events
added as 2 attributes as it can be built for X11 or to use libinput, with the default being X11 as that's more common
with libinput it works on wayland and even bare terminals, but requires the user running it to be in the
input
group (this is noted in the longDescription)this should maybe be set up via
programs.bucklespring.enable
but i got stuck on getting that to work a few too many times for something this sillyused the latest master commit because the latest release is 4 years old and several features have been added since
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)185854608
forbucklespring-x11
187148680
forbucklespring-libinput