Flake: update lock file and remove unneeded nixpkgs patches

This commit is contained in:
Toast 2024-12-18 15:47:03 +01:00
parent 49130f062d
commit fe9678388d
3 changed files with 50 additions and 239 deletions

98
flake.lock generated
View file

@ -25,11 +25,11 @@
}, },
"catppuccin": { "catppuccin": {
"locked": { "locked": {
"lastModified": 1733001911, "lastModified": 1734397929,
"narHash": "sha256-uX/9m0TbdhEzuWA0muM5mI/AaWcLiDLjCCyu5Qr9MRk=", "narHash": "sha256-VCTVpU/RlrI9StxzDnqc1R3ZTQloLVALSkiN/Fgiad4=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "a817009ebfd2cca7f70a77884e5098d0a8c83f8e", "rev": "21310cde33d3ee8023679dec01a9724a346c63ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -219,11 +219,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733754861, "lastModified": 1734344598,
"narHash": "sha256-3JKzIou54yjiMVmvgdJwopekEvZxX3JDT8DpKZs4oXY=", "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9ebaa80a227eaca9c87c53ed515ade013bc2bca9", "rev": "83ecd50915a09dca928971139d3a102377a8d242",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -239,11 +239,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733572789, "lastModified": 1734366194,
"narHash": "sha256-zjO6m5BqxXIyjrnUziAzk4+T4VleqjstNudSqWcpsHI=", "narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c7ffc9727d115e433fd884a62dc164b587ff651d", "rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -261,11 +261,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733762021, "lastModified": 1734162608,
"narHash": "sha256-QAc+GvjJXLyp7oy2Vt1LEjYnq6UXPAmncwpL5aZUsUM=", "narHash": "sha256-m2AX+3eiVqIK6uO7GbGY7SFnkkYOlR5fQiNI0eRvWOQ=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "f2180c6fcfca4eaecd79eadba0b5874e9a1c70c1", "rev": "31bdf4c7c91204d65afbde01146deee0259a8fb7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -277,11 +277,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733740102, "lastModified": 1733932114,
"narHash": "sha256-zIm58tETZ5Z6Scsjrn9rPISLzH4kWb2MIoC/jdii5ts=", "narHash": "sha256-LN4pgLjGWztTlJ4oDcKWvDuTFeUUVgbmXoZ2EXG20Gw=",
"rev": "369e3f82f066866b4d75abc5fc66e5b8e2149b4c", "rev": "92ed9fee7d169febf53ea85961174fc0a22c2115",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/369e3f82f066866b4d75abc5fc66e5b8e2149b4c.tar.gz?rev=369e3f82f066866b4d75abc5fc66e5b8e2149b4c" "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/92ed9fee7d169febf53ea85961174fc0a22c2115.tar.gz?rev=92ed9fee7d169febf53ea85961174fc0a22c2115"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -336,11 +336,11 @@
}, },
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1733345341, "lastModified": 1734128415,
"narHash": "sha256-8S58zrdpzGhax6tmn1i+R3AA0N9DJMu5FQI8JkA0NNU=", "narHash": "sha256-HLwdVNxpuTsLlM3tCkpbQU6yCehdgf3kOS1G2SDlkzY=",
"owner": "gmodena", "owner": "gmodena",
"repo": "nix-flatpak", "repo": "nix-flatpak",
"rev": "ebb0be49fc381112ff37726c6dd6df4df2ef5a1b", "rev": "8bdc2540da516006d07b04019eb57ae0781a04b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -374,11 +374,11 @@
}, },
"nix-impermanence": { "nix-impermanence": {
"locked": { "locked": {
"lastModified": 1731242966, "lastModified": 1734200366,
"narHash": "sha256-B3C3JLbGw0FtLSWCjBxU961gLNv+BOOBC6WvstKLYMw=", "narHash": "sha256-0NursoP4BUdnc+wy+Mq3icHkXu/RgP1Sjo0MJxV2+Dw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "impermanence", "repo": "impermanence",
"rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a", "rev": "c6323585fa0035d780e3d8906eb1b24b65d19a48",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -394,11 +394,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733629314, "lastModified": 1734234111,
"narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -414,11 +414,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733629314, "lastModified": 1734234111,
"narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -436,11 +436,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733709556, "lastModified": 1734314370,
"narHash": "sha256-u0ll0DDrKlO7tiLGGtmphv3wFy5ReDuf0USo/OlfROU=", "narHash": "sha256-9PhjDAAuXP4tuJg+kM1AozKwBFyHHJ8ZqhQD+peqGtg=",
"owner": "Infinidoge", "owner": "Infinidoge",
"repo": "nix-minecraft", "repo": "nix-minecraft",
"rev": "8d11f147df83fe137d3d94f6f3646e3a52bec855", "rev": "616634de04e87b621bc3d495af114c4e9c6ccd36",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -451,11 +451,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1733481457, "lastModified": 1734352517,
"narHash": "sha256-IS3bxa4N1VMSh3/P6vhEAHQZecQ3oAlKCDvzCQSO5Is=", "narHash": "sha256-mfv+J/vO4nqmIOlq8Y1rRW8hVsGH3M+I2ESMjhuebDs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "e563803af3526852b6b1d77107a81908c66a9fcf", "rev": "b12e314726a4226298fe82776b4baeaa7bcf3dcd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -467,11 +467,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733581040, "lastModified": 1734424634,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -483,11 +483,11 @@
}, },
"nixpkgs-raw": { "nixpkgs-raw": {
"locked": { "locked": {
"lastModified": 1733550349, "lastModified": 1734323986,
"narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=", "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34", "rev": "394571358ce82dff7411395829aa6a3aad45b907",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -498,11 +498,11 @@
}, },
"nixpkgs-unstable-raw": { "nixpkgs-unstable-raw": {
"locked": { "locked": {
"lastModified": 1733581040, "lastModified": 1734424634,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -518,11 +518,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1733824207, "lastModified": 1734529681,
"narHash": "sha256-qGXcFigGMSFba29CtCnTgf/c9h+Dzh6yHcXTK16jXJ8=", "narHash": "sha256-pe/fHd6nuz8nxwyVsLDDilgy+0rXJ1iYhCFojFlV8QE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "f1ea8bb704f71d74dcc885d6bd149b5b661bb858", "rev": "29cbfd0aad3f30ed30312668b3d8dca522175349",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -541,11 +541,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733578387, "lastModified": 1733858086,
"narHash": "sha256-XkMZGeqg0GCRoSXvMcaHP7bdvWPRZxCK1sw1ASsc16E=", "narHash": "sha256-h2BDIDKiqgMpA6E+mu0RgMGy3FeM6k+EuJ9xgOQ1+zw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "plasma-manager", "repo": "plasma-manager",
"rev": "2a64e173f1effdcc86e25cba0601e8feedf89115", "rev": "7e2010249529931a3848054d5ff0dbf24675ab68",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -103,9 +103,7 @@
nixpkgs-unstable-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { nixpkgs-unstable-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches {
name = "patched-nixpkgs-unstable"; name = "patched-nixpkgs-unstable";
src = nixpkgs-unstable-raw; src = nixpkgs-unstable-raw;
patches = [ patches = [];
./nixpkgs-patches/pr361364.patch
];
}; };
nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches {
name = "patched-nixpkgs"; name = "patched-nixpkgs";

View file

@ -1,187 +0,0 @@
From c94ae7a159eb8cd86f46ca1ea81dbdca651510f4 Mon Sep 17 00:00:00 2001
From: Gaetan Lepage <gaetan@glepage.com>
Date: Tue, 3 Dec 2024 08:47:26 +0100
Subject: [PATCH 1/2] 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 | 87 ++++++++++++++-------
1 file changed, 57 insertions(+), 30 deletions(-)
diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix
index b99cd1c581476..6b5965e06e645 100644
--- a/pkgs/by-name/ha/handheld-daemon/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon/package.nix
@@ -1,63 +1,90 @@
{
+ lib,
+ python3Packages,
fetchFromGitHub,
+
+ # dependencies
+ systemd,
hidapi,
+ coreutils,
kmod,
- lib,
- python3,
- toybox,
- lsof
+ dbus,
+ 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=";
+ tag = "v${version}";
+ hash = "sha256-W1Ap6yTryBDozKe3aO413Fu0RBul9kEA9ACUTdYyOKM=";
};
- propagatedBuildInputs = with python3.pkgs; [
+ # This package relies on several programs expected to be on the user's PATH.
+ # We take a more reproducible approach by patching the absolute path to each of these required
+ # binaries.
+ postPatch = ''
+ substituteInPlace src/hhd/controller/lib/hid.py \
+ --replace-fail "libhidapi" "${lib.getLib hidapi}/lib/libhidapi"
+
+ substituteInPlace src/hhd/controller/lib/hide.py \
+ --replace-fail "/bin/chmod" "${lib.getExe' coreutils "chmod"}" \
+ --replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"
+
+ substituteInPlace src/hhd/controller/physical/evdev.py \
+ --replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"
+
+ substituteInPlace src/hhd/controller/physical/imu.py \
+ --replace-fail '"modprobe' '"${lib.getExe' kmod "modprobe"}'
+
+ substituteInPlace src/hhd/device/oxp/serial.py \
+ --replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"
+
+ substituteInPlace src/hhd/plugins/overlay/systemd.py \
+ --replace-fail "dbus-monitor" "${lib.getExe' dbus "dbus-monitor"}" \
+ --replace-fail "systemd-inhibit" "${lib.getExe' systemd "systemd-inhibit"}"
+
+ substituteInPlace src/hhd/plugins/overlay/x11.py \
+ --replace-fail "lsof" "${lib.getExe lsof}"
+
+ substituteInPlace src/hhd/plugins/plugin.py \
+ --replace-fail '"id"' '"${lib.getExe' coreutils "id"}"'
+ '';
+
+ build-system = with python3Packages; [
+ setuptools
+ ];
+
+ dependencies = with python3Packages; [
evdev
- hidapi
- kmod
+ pyserial
pyyaml
rich
setuptools
- toybox
xlib
- pyserial
- lsof
];
# This package doesn't have upstream tests.
doCheck = false;
- postPatch = ''
- # handheld-daemon contains a fork of the python module `hid`, so this hook
- # is borrowed from the `hid` derivation.
- 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 = ''
install -Dm644 $src/usr/lib/udev/rules.d/83-hhd.rules -t $out/lib/udev/rules.d/
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.gpl3Only;
+ maintainers = with lib.maintainers; [
+ appsforartists
+ toast
+ ];
mainProgram = "hhd";
};
}
From 2cf68f2bf37655d730202f2e551b40172181801c Mon Sep 17 00:00:00 2001
From: Gaetan Lepage <gaetan@glepage.com>
Date: Mon, 9 Dec 2024 10:26:53 +0100
Subject: [PATCH 2/2] handheld-daemon: 3.6.2 -> 3.7.0
Diff: https://github.com/hhd-dev/hhd/compare/None...v3.7.0
Changelog: https://github.com/hhd-dev/hhd/releases/tag/v3.7.0
---
pkgs/by-name/ha/handheld-daemon/package.nix | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix
index 6b5965e06e645..2fe0c45eca77f 100644
--- a/pkgs/by-name/ha/handheld-daemon/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon/package.nix
@@ -8,19 +8,20 @@
hidapi,
coreutils,
kmod,
+ efibootmgr,
dbus,
lsof,
}:
python3Packages.buildPythonApplication rec {
pname = "handheld-daemon";
- version = "3.6.2";
+ version = "3.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "hhd-dev";
repo = "hhd";
tag = "v${version}";
- hash = "sha256-W1Ap6yTryBDozKe3aO413Fu0RBul9kEA9ACUTdYyOKM=";
+ hash = "sha256-DkVdYnSEeaNZj76lhdU+9Pl0yzam2A2QGa3aHCmSHEA=";
};
# This package relies on several programs expected to be on the user's PATH.
@@ -40,6 +41,9 @@ python3Packages.buildPythonApplication rec {
substituteInPlace src/hhd/controller/physical/imu.py \
--replace-fail '"modprobe' '"${lib.getExe' kmod "modprobe"}'
+ substituteInPlace src/hhd/plugins/overlay/power.py \
+ --replace-fail '"efibootmgr"' '"${lib.getExe' efibootmgr "id"}"'
+
substituteInPlace src/hhd/device/oxp/serial.py \
--replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"