Skip to content

keyspersecond: init at 8.9#281495

Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom
TomaSajt:keyspersecond
Oct 28, 2024
Merged

keyspersecond: init at 8.9#281495
Aleksanaa merged 1 commit intoNixOS:masterfrom
TomaSajt:keyspersecond

Conversation

@TomaSajt
Copy link
Contributor

@TomaSajt TomaSajt commented Jan 17, 2024

Description of changes

Closes #281453

This PR adds 1 package: keyspersecond
This is a java app, using Gradle as the build system.
Luckily, there were less gradle shenanigans than with other packages.

I used stripJavaArchivesHook to fix the timestamps in the jar file

I do not know if darwin also needs extra runtime libraries, sadly I cannot test it.

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.

@gepbird
Copy link
Contributor

gepbird commented Jan 17, 2024

Tested basic functionality: it listens for keypresses when osu-lazer is in focus and updates the key counter accordingly on X11. Thanks for packaging it @TomaSajt!

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jan 17, 2024
@UlyssesZh
Copy link
Member

Thank you for your work! Some suggestions:

  • KeysPerSecond v8.9 has been released.
  • Add the flag -Dsun.java2d.opengl=true in the command wrapper; otherwise, the background color cannot be translucent.
  • Could you please also add a desktop entry?

@TomaSajt TomaSajt force-pushed the keyspersecond branch 2 times, most recently from cfcbb87 to 77cf6f7 Compare March 8, 2024 22:40
@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 8, 2024

I did a big restructuring of the whole derivation, hopefully this way its in a more "override"-able state.

I also dropped the usage of canonicalize-jars-jook in place of a better built-in solution (added by a patch file)

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 8, 2024

I can't seem to be able to use the colors set in the color selector (bug?), so I don't know if the transparency fix works or not.

@UlyssesZh
Copy link
Member

I can't seem to be able to use the colors set in the color selector (bug?), so I don't know if the transparency fix works or not.

In the color config interface, there is a checkbox saying "enable custom colors". You need check that on.

Upon second thought, I think enabling this flag in the command wrapper may cause some problems when OpenGL is not supported? I do not have an environment to test that, though.

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 9, 2024

In the color config interface, there is a checkbox saying "enable custom colors". You need check that on.

I'm using a dark theme, so most of the UI is pretty unintelligible, because of this that toggle button wasn't even visible to me.

I tried it out, and it wasn't working properly yet. However after debugging with J2D_TRACE_LEVEL=4 I figured out that libGL just wasn't able to be found, so I added it to libPath. It now seems to work OK

@TomaSajt TomaSajt force-pushed the keyspersecond branch 2 times, most recently from 193fc25 to 4a117bf Compare March 9, 2024 00:45
@bjornfor
Copy link
Contributor

bjornfor commented Mar 9, 2024

I used canonicalize-jars-hook to fix the timestamps in the jar file.
I used a built-in build flag inside gradle to have a deterministic timestamp in the jar file.

Cool! Do you think this can be generalized and used across nixpkgs?

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 9, 2024

I used canonicalize-jars-hook to fix the timestamps in the jar file.
I used a built-in build flag inside gradle to have a deterministic timestamp in the jar file.

Cool! Do you think this can be generalized and used across nixpkgs?

I think we can, but mostly with manual patches.
See this comment for every solution I could find to not have to use canonicalize-jars-hook.

@TomaSajt TomaSajt force-pushed the keyspersecond branch 2 times, most recently from 9ebd384 to 3a879c8 Compare March 23, 2024 07:12
@TomaSajt TomaSajt changed the title keyspersecond: init at 8.8 keyspersecond: init at 8.9 Jun 27, 2024
@chayleaf
Copy link
Contributor

#272380 got merged, so you should adjust the code accordingly (it should be greatly simplified). See https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/gradle.section.md

@TomaSajt
Copy link
Contributor Author

#272380 got merged, so you should adjust the code accordingly (it should be greatly simplified). See https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/gradle.section.md

That's really great to hear, I've been excited to finally try it out.

@TomaSajt TomaSajt force-pushed the keyspersecond branch 3 times, most recently from 9c47a80 to 76ef523 Compare July 15, 2024 19:51
@Aleksanaa Aleksanaa merged commit 6e35f2d into NixOS:master Oct 28, 2024
@TomaSajt TomaSajt deleted the keyspersecond branch June 19, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: KeysPerSecond

6 participants