NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14.01k forks source link

package request: KMonad #84550

Closed evertedsphere closed 3 years ago

evertedsphere commented 4 years ago

Project description uinput-based keyboard remapping software

Metadata

Edit: I would be happy to serve as maintainer for this, I just don't know much about setting up all the udev rules and such which is why I'd like some help here.

evertedsphere commented 4 years ago

i think something like this might be required

{
  boot.kernelModules = [ "uinput" ];

  services.udev.extraRules = ''
    KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"
  '';
}
cdepillabout commented 4 years ago

@evertedsphere The first step here would be packaging KMonad in the Haskell package set. That way you could install it like nix-env -iA nixos.haskellPackages.kmonad.

The easiest way to do this would be to get the maintainer to upload it Hackage. Nixpkgs (and other Linux distributions) have an automatic way of building and distributing packages that are on Hackage, so if the maintainer just uploads KMonad to Hackage, it will be easier for distros to support it. (Even better would be if the author is willing to get it in Stackage.) In fact, you would likely not have to do anything at all for this, because the process is entirely automatic here in nixpkgs.

Once KMonad is available in the Hackage package set, you will need to actually create a NixOS module for it. Maybe provide an option like services.kmonad.enable, and when that is enabled, it sets the kernel modules and udev extra rules that you've discovered.

evertedsphere commented 4 years ago

@cdepillabout that's helpful! i'll try my hand at it tomorrow if i can

david-janssen commented 4 years ago

Hey there,

I'm the core developer of KMonad. Just want to say it is very cool to see you guys adding it to nixpkgs. I also wanted to mention that I do actually have statically compiled binaries on the releases of the kmonad github page. Used static-haskell-nix. Here's a link to the most recent one: https://github.com/david-janssen/kmonad/releases/download/0.4.0/kmonad-0.4.0-linux

Would that save people loads of compilation time? Or are these builds cached somewhere automatically? Not too nix-savvy I'm afraid.

EDIT: Oh, and I will be putting the code on Hackage as requested, after I've fixed up the haddocks.

cdepillabout commented 4 years ago

@david-janssen Most Haskell packages here in nixpkgs are automatically pulled from Hackage and built with dynamic-linking, so having static packages doesn't really help us.

However, there are many non-Nix users (especially Non-Haskellers) that usually like having statically linked binaries available.

david-janssen commented 4 years ago

@cdepillabout Thanks for the info.

I will take some time to clean up the haddocks and then put everything on hackage. This might take a while though. Cheers!

david-janssen commented 4 years ago

We are now on hackage: https://hackage.haskell.org/package/kmonad

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

cdepillabout commented 3 years ago

Since this is on Hackage, kmonad should now be available in nixpkgs.

ppom0 commented 3 years ago

Hi! kmonad is currently marked as broken on nixkpgs...

cdepillabout commented 3 years ago

@aopom Please feel free to send a PR fixing it, or open an issue if you're not able to figure it out.

drozdziak1 commented 1 year ago

Is it's broken in nixpkgs, try the upstream module. I've been daily driving KMonad's upstream nixos module for some time now and it's been working widthout trouble.

jfvillablanca commented 1 year ago

Can this issue be reopened? Kmonad is still broken in nixpkgs. I would be interested in becoming a maintainer if necessary but it seems like hackage packages are made available to nixpkgs automatically. I am also not familiar with haskell projects.

cdepillabout commented 1 year ago

@jfvillablanca Could you open an issue about fixing it? This issue was for the original request for providing it from Nixpkgs, but it is already in Nixpkgs. It is just broken.

jfvillablanca commented 1 year ago

Sure! Should I place it under Bug Report?

Atemu commented 1 year ago

Build failure.