nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3,
4 fetchFromGitHub,
5}:
6python3.pkgs.buildPythonApplication rec {
7 pname = "joystickwake";
8 version = "0.4.2";
9 pyproject = true;
10
11 src = fetchFromGitHub {
12 owner = "foresto";
13 repo = "joystickwake";
14 tag = "v${version}";
15 sha256 = "sha256-vSvIpbcDIbRyitVjx3wNSxt5vTIZ9/NPWokOJt0p6oQ=";
16 };
17
18 build-system = with python3.pkgs; [
19 setuptools
20 ];
21
22 dependencies = with python3.pkgs; [
23 dbus-next
24 pyudev
25 xlib
26 ];
27
28 postInstall = ''
29 # autostart file
30 ln -s $out/${python3.sitePackages}/etc $out/etc
31 '';
32
33 meta = {
34 description = "Joystick-aware screen waker";
35 mainProgram = "joystickwake";
36 longDescription = ''
37 Linux gamers often find themselves unexpectedly staring at a blank screen, because their display server fails to recognize game controllers as input devices, allowing the screen blanker to activate during gameplay.
38 This program works around the problem by temporarily disabling screen blankers when joystick activity is detected.
39 '';
40 homepage = "https://github.com/foresto/joystickwake";
41 maintainers = with lib.maintainers; [ bertof ];
42 license = lib.licenses.mit;
43 platforms = lib.platforms.linux;
44 };
45}