Skip to content

Commit

Permalink
xpadneo: fix for 6.13
Browse files Browse the repository at this point in the history
  • Loading branch information
pongo1231 committed Dec 19, 2024
1 parent 318948c commit 795e25c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 9 deletions.
11 changes: 2 additions & 9 deletions modules/wicked_kernel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@
};
});

/*xpadneo = prevAttrs.xpadneo.overrideAttrs (prevAttrs: {
src = final.fetchFromGitHub {
owner = "atar-axis";
repo = "xpadneo";
rev = "be65dbb793b09241c4a525ce3363f797672b3301";
hash = "sha256-COmi4sxz6m5IPW8ruzHsw+LsepEgA5+A6Yh1642MSAM=";
};
});*/
xpadneo = (finalAttrs.callPackage (pkg /xpadneo) { });
});
})
];
Expand Down Expand Up @@ -235,5 +228,5 @@
"w! /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_none - - - - 409"
];

hardware.xpadneo.enable = lib.mkForce false;
#hardware.xpadneo.enable = lib.mkForce false;
}
51 changes: 51 additions & 0 deletions pkgs/xpadneo/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ lib
, stdenv
, fetchFromGitHub
, kernel
, bluez
, nixosTests
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xpadneo";
version = "0.9.7-git";

src = fetchFromGitHub {
owner = "atar-axis";
repo = "xpadneo";
rev = "227c101fea112e8b7309aadb736b9a1c4120b126";
sha256 = "sha256-fI6gX2p2RaJdKi8bluGjqryg0Zjv8otvDe0Fph72mMw=";
};

setSourceRoot = ''
export sourceRoot=$(pwd)/${finalAttrs.src.name}/hid-xpadneo/src
'';

nativeBuildInputs = kernel.moduleBuildDependencies;
buildInputs = [ bluez ];

makeFlags = [
"-C"
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"M=$(sourceRoot)"
"VERSION=${finalAttrs.version}"
];

buildFlags = [ "modules" ];
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
installTargets = [ "modules_install" ];

passthru.tests = {
xpadneo = nixosTests.xpadneo;
};

passthru.updateScript = nix-update-script { };

meta = with lib; {
description = "Advanced Linux driver for Xbox One wireless controllers";
homepage = "https://atar-axis.github.io/xpadneo";
license = licenses.gpl3Only;
maintainers = with maintainers; [ kira-bruneau ];
platforms = platforms.linux;
};
})

0 comments on commit 795e25c

Please sign in to comment.