From 30e89ac9d38e97c80dff7a077bda6971c5c562f4 Mon Sep 17 00:00:00 2001 From: Toast Date: Tue, 3 Dec 2024 09:29:27 +0100 Subject: [PATCH 1/2] Flake: add pr 361364 --- flake.nix | 1 + nixpkgs-patches/pr361364.patch | 84 ++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 nixpkgs-patches/pr361364.patch diff --git a/flake.nix b/flake.nix index b4bad73..d1b5f54 100644 --- a/flake.nix +++ b/flake.nix @@ -100,6 +100,7 @@ src = nixpkgs-unstable-raw; patches = [ ./nixpkgs-patches/pr359282.patch + ./nixpkgs-patches/pr361364.patch ]; }; nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { diff --git a/nixpkgs-patches/pr361364.patch b/nixpkgs-patches/pr361364.patch new file mode 100644 index 0000000..71a2791 --- /dev/null +++ b/nixpkgs-patches/pr361364.patch @@ -0,0 +1,84 @@ +From 437bcf5ec44352a643ce4baecb61e2bde2128e8d Mon Sep 17 00:00:00 2001 +From: Gaetan Lepage +Date: Tue, 3 Dec 2024 08:47:26 +0100 +Subject: [PATCH] handheld-daemon: 3.6.1 -> 3.6.2 + +Diff: https://github.com/hhd-dev/hhd/compare/refs/tags/v3.6.1...v3.6.2 + +Changelog: https://github.com/hhd-dev/hhd/releases/tag/v3.6.2 +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 32 ++++++++++++--------- + 1 file changed, 19 insertions(+), 13 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index b99cd1c581476..77c898381a004 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -1,35 +1,37 @@ + { ++ lib, ++ python3Packages, + fetchFromGitHub, ++ ++ # dependencies + hidapi, + kmod, +- lib, +- python3, ++ lsof, + toybox, +- lsof + }: +-python3.pkgs.buildPythonApplication rec { ++python3Packages.buildPythonApplication rec { + pname = "handheld-daemon"; +- version = "3.6.1"; ++ version = "3.6.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = "hhd"; + rev = "refs/tags/v${version}"; +- hash = "sha256-IdpSRb66G+WzTv/BC29r2OjO1b4VdWbV6OSzOoiFAO0="; ++ hash = "sha256-W1Ap6yTryBDozKe3aO413Fu0RBul9kEA9ACUTdYyOKM="; + }; + +- propagatedBuildInputs = with python3.pkgs; [ ++ dependencies = with python3Packages; [ + evdev + hidapi + kmod ++ lsof ++ pyserial + pyyaml + rich + setuptools + toybox + xlib +- pyserial +- lsof + ]; + + # This package doesn't have upstream tests. +@@ -52,12 +54,16 @@ python3.pkgs.buildPythonApplication rec { + install -Dm644 $src/usr/lib/udev/hwdb.d/83-hhd.hwdb -t $out/lib/udev/hwdb.d/ + ''; + +- meta = with lib; { ++ meta = { + homepage = "https://github.com/hhd-dev/hhd/"; + description = "Linux support for handheld gaming devices like the Legion Go, ROG Ally, and GPD Win"; +- platforms = platforms.linux; +- license = licenses.mit; +- maintainers = with maintainers; [ appsforartists toast ]; ++ platforms = lib.platforms.linux; ++ changelog = "https://github.com/hhd-dev/hhd/releases/tag/v${version}"; ++ license = lib.licenses.mit; ++ maintainers = with lib.maintainers; [ ++ appsforartists ++ toast ++ ]; + mainProgram = "hhd"; + }; + } From aee3b502127c3d261a990a742187f842dfcb3b4d Mon Sep 17 00:00:00 2001 From: Toast Date: Tue, 3 Dec 2024 10:24:34 +0100 Subject: [PATCH 2/2] Machines/WinMax2: enable bluetooth wake from sleep --- machines/WinMax2/configuration.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/machines/WinMax2/configuration.nix b/machines/WinMax2/configuration.nix index b367dc7..7c4ea9a 100755 --- a/machines/WinMax2/configuration.nix +++ b/machines/WinMax2/configuration.nix @@ -45,6 +45,9 @@ ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="GXTP7385:00", ATTR{power/wakeup}="disabled" ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="PNP0C50:00", ATTR{power/wakeup}="disabled" SUBSYSTEM=="usb", ATTR{idVendor}=="2541", ATTR{idProduct}=="9711", ATTR{remove}="1" + + # Enable wake from bluetooth + SUBSYSTEM=="usb", ATTRS{idVendor}=="8087", ATTRS{idProduct}=="0032" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup;" ''; services = {