From 9e1ae553cf1a843e80630c233438cfb550acf39d Mon Sep 17 00:00:00 2001 From: Toast Date: Tue, 7 May 2024 09:36:20 +0200 Subject: [PATCH 1/2] Flake: add nixpkgs patches --- flake.nix | 5 ++- ...Revert-handheld-daemon-undo-refactor.patch | 40 +++++++++++++++++++ .../0001-handheld-daemon-2.6.4-2.7.2.patch | 33 +++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 nixpkgs-patches/0001-Revert-handheld-daemon-undo-refactor.patch create mode 100644 nixpkgs-patches/0001-handheld-daemon-2.6.4-2.7.2.patch diff --git a/flake.nix b/flake.nix index 4c6d85f..44b41b8 100644 --- a/flake.nix +++ b/flake.nix @@ -77,7 +77,10 @@ nixpkgs-unstable-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { name = "patched-nixpkgs-unstable"; src = nixpkgs-unstable-raw; - patches = []; + patches = [ + ./nixpkgs-patches/0001-handheld-daemon-2.6.4-2.7.2.patch + ./nixpkgs-patches/0001-Revert-handheld-daemon-undo-refactor.patch + ]; }; nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { name = "patched-nixpkgs"; diff --git a/nixpkgs-patches/0001-Revert-handheld-daemon-undo-refactor.patch b/nixpkgs-patches/0001-Revert-handheld-daemon-undo-refactor.patch new file mode 100644 index 0000000..a16b9e7 --- /dev/null +++ b/nixpkgs-patches/0001-Revert-handheld-daemon-undo-refactor.patch @@ -0,0 +1,40 @@ +From 904067bc281924e86e936c7d0162131e8af86d64 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 6 May 2024 12:26:54 +0200 +Subject: [PATCH 1/1] Revert "handheld-daemon: undo refactor" + +This reverts commit d9b487ae609a368378c1a9d89a5441c5c44121df. +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 246e3879bb5c..ad0554bec36d 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -34,15 +34,17 @@ python3.pkgs.buildPythonApplication rec { + doCheck = false; + + postPatch = '' ++ # The generated udev rules point to /bin/chmod, which does not exist in NixOS ++ substituteInPlace src/hhd/controller/lib/hide.py \ ++ --replace-fail /bin/chmod ${toybox}/bin/chmod ++ + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. ++ substituteInPlace src/hhd/controller/lib/hid.py \ ++ --replace-fail libhidapi ${hidapi}/lib/libhidapi ++ + hidapi=${hidapi}/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } +- sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py +- +- # The generated udev rules point to /bin/chmod, which does not exist in NixOS +- chmod=${toybox}/bin/chmod +- sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + + postInstall = '' +-- +2.44.0 + diff --git a/nixpkgs-patches/0001-handheld-daemon-2.6.4-2.7.2.patch b/nixpkgs-patches/0001-handheld-daemon-2.6.4-2.7.2.patch new file mode 100644 index 0000000..7921f80 --- /dev/null +++ b/nixpkgs-patches/0001-handheld-daemon-2.6.4-2.7.2.patch @@ -0,0 +1,33 @@ +From 742e26325f8d5b8bcc97afd11ae188c53c6f80f1 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 6 May 2024 11:52:09 +0200 +Subject: [PATCH 1/1] handheld-daemon: 2.6.4 -> 2.7.2 + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 246e3879bb5c..ec24637dde3f 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -9,14 +9,14 @@ + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +- version = "2.6.4"; ++ version = "2.7.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = "hhd"; + rev = "v${version}"; +- hash = "sha256-S77APtE1GGfqnv1IkZdJOSlprPOBtrqVXV60yVMvopg="; ++ hash = "sha256-jWLL1nmKam1iJ1R1l/OuIp+isgZ7toRhVamx1nOID/8="; + }; + + propagatedBuildInputs = with python3.pkgs; [ +-- +2.44.0 + From a66628290b11f12fa181b0d690b6b9faee62954a Mon Sep 17 00:00:00 2001 From: Toast Date: Tue, 7 May 2024 10:19:51 +0200 Subject: [PATCH 2/2] Desktop/discord: update vencord --- roles/desktop/programs/discord.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/roles/desktop/programs/discord.nix b/roles/desktop/programs/discord.nix index 722d013..58051ae 100644 --- a/roles/desktop/programs/discord.nix +++ b/roles/desktop/programs/discord.nix @@ -9,18 +9,17 @@ withVencord = true; }; # Update some stuff while I wait for nixpkgs - /* vencord = super.vencord.overrideAttrs rec { - version = "522fdcd"; + version = "1.8.1"; src = pkgs.fetchFromGitHub { owner = "Vendicated"; repo = "Vencord"; - rev = "522fdcd"; - #rev = "v${version}"; - hash = "sha256-9G7FNL4pHaaLachzJmeAol0WpNUj533K2FNa7DH0eBM="; + rev = "a525cd0113b37fbe08512a6e68ecb62b8d74cd72"; + # rev = "v${version}"; + hash = "sha256-97KgELDNhP2aZU66tC+F/QfHuWnICGRzXQFQMbim4Sk="; }; + npmDepsHash = "sha256-97KgELDNhP2aZU66tC+F/QfHuWnICGRzXQFQMbim4Sk="; }; - */ }; stock-discord = _self: super: { discord = super.discord.override {