Merge pull request #192154 from kira-bruneau/linuxPackages.xpadneo
linuxPackages.xpadneo: 0.9.4 -> 0.9.5
This commit is contained in:
commit
f185f71ed8
4 changed files with 38 additions and 9 deletions
|
@ -678,6 +678,7 @@ in {
|
|||
xfce = handleTest ./xfce.nix {};
|
||||
xmonad = handleTest ./xmonad.nix {};
|
||||
xmonad-xdg-autostart = handleTest ./xmonad-xdg-autostart.nix {};
|
||||
xpadneo = handleTest ./xpadneo.nix {};
|
||||
xrdp = handleTest ./xrdp.nix {};
|
||||
xss-lock = handleTest ./xss-lock.nix {};
|
||||
xterm = handleTest ./xterm.nix {};
|
||||
|
|
18
nixos/tests/xpadneo.nix
Normal file
18
nixos/tests/xpadneo.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
||||
name = "xpadneo";
|
||||
meta.maintainers = with lib.maintainers; [ kira-bruneau ];
|
||||
|
||||
nodes = {
|
||||
machine = {
|
||||
config.hardware.xpadneo.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# This is just a sanity check to make sure the module was
|
||||
# loaded. We'd have to find some way to mock an xbox controller if
|
||||
# we wanted more in-depth testing.
|
||||
testScript = ''
|
||||
machine.start();
|
||||
machine.succeed("modinfo hid_xpadneo | grep 'version:\s\+${pkgs.linuxPackages.xpadneo.version}'")
|
||||
'';
|
||||
})
|
|
@ -1,14 +1,20 @@
|
|||
{ lib, stdenv, fetchFromGitHub, kernel, bluez }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, kernel
|
||||
, bluez
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xpadneo";
|
||||
version = "0.9.4";
|
||||
version = "0.9.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "atar-axis";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-4zd+x9uYl0lJgePM9LEgLYFqvcw6VPF/CbR1XiYSwGE=";
|
||||
repo = "xpadneo";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
sha256 = "sha256-rT2Mq40fE055FemDG7PBjt+cxgIHJG9tTjtw2nW6B98=";
|
||||
};
|
||||
|
||||
setSourceRoot = ''
|
||||
|
@ -22,13 +28,17 @@ stdenv.mkDerivation rec {
|
|||
"-C"
|
||||
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
"M=$(sourceRoot)"
|
||||
"VERSION=${version}"
|
||||
"VERSION=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
buildFlags = [ "modules" ];
|
||||
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
|
||||
installTargets = [ "modules_install" ];
|
||||
|
||||
passthru.tests = {
|
||||
xpadneo = nixosTests.xpadneo;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Advanced Linux driver for Xbox One wireless controllers";
|
||||
homepage = "https://atar-axis.github.io/xpadneo";
|
||||
|
@ -36,4 +46,4 @@ stdenv.mkDerivation rec {
|
|||
maintainers = with maintainers; [ kira-bruneau ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue