extest: init at 1.0.2

This commit is contained in:
Brian McKenna 2023-11-25 20:13:41 +11:00 committed by tomf
parent ba7f53d7ab
commit 5dffe7eebf
2 changed files with 37 additions and 0 deletions

View file

@ -56,6 +56,8 @@ in {
# use the setuid wrapped bubblewrap
bubblewrap = "${config.security.wrapperDir}/..";
};
} // optionalAttrs cfg.extest.enable {
extraEnv.LD_PRELOAD = "${pkgs.pkgsi686Linux.extest}/lib/libextest.so";
});
description = lib.mdDoc ''
The Steam package to use. Additional libraries are added from the system
@ -114,6 +116,15 @@ in {
};
};
};
extest.enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Load the extest library into Steam, to translate X11 input events to
uinput events (e.g. for using Steam Input on Wayland)
'';
};
};
config = mkIf cfg.enable {

View file

@ -0,0 +1,26 @@
{ lib
, fetchFromGitHub
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "extest";
version = "1.0.2";
src = fetchFromGitHub {
owner = "Supreeeme";
repo = "extest";
rev = version;
hash = "sha256-qdTF4n3uhkl3WFT+7bAlwCjxBx3ggTN6i3WzFg+8Jrw=";
};
cargoHash = "sha256-JZPiTzr9KaaqiXKhsGOYmYMtjNzPQzKhqyfSlbeqME8=";
meta = with lib; {
description = "X11 XTEST reimplementation primarily for Steam Controller on Wayland";
homepage = "https://github.com/Supreeeme/extest";
platforms = platforms.linux;
license = licenses.mit;
maintainers = [ maintainers.puffnfresh ];
};
}