Out of tree kernel modules (xpad)?

I’m trying to install xpad but can’t get it to compile. Not imperatively by just cloning and running make or in a nix derivation. The intended way of building is through dkms (somehow?) but we don’t have that.

Does anyone already have a derivation I can copy or can provide help with this?

I would start from another kernel module like https://github.com/NixOS/nixpkgs/blob/b2aeb9072b698553c2332e6bd6128eb0dce5e9ee/pkgs/os-specific/linux/hid-nintendo/default.nix

That’s what I did with no luck, but this one looks entirely different and the repo structure looks more similar to xpad, so I’ll try that

Now I (according to reddit at least) need a udev rule with access to coreutils’ echo.

I can’t get that to work now. Despite coretutils being in buildInputs it gets rejected.

My wip package
Error

Never mind, I was being stupid and forgetting the $ in ${pkgs.foo}

For anyone finding this thread trying to get the 8Bitdo Ultimate Wireless Bluetooth working on NixOS, I’m not gonna leave you like DenverCode9. I haven’t tried reducing this to what’s the bare minimum, but here’s my current setup:

xpad.nix
Module setup in configuration.nix
udev rules in configuration.nix

2 Likes

I can’t believe this. I copied your configuration and it just worked magically first try! This is a first for me for any Nix issue let alone some obscure gamepad driver issue with specifically the 8Bitdo Ultimate Wireless Bluetooth. All I can say is thank you so much!!!

1 Like