From 33b5e7c400ee9ed77b4f3102be79ec82aee9bfb4 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Tue, 30 Jun 2026 13:19:35 +0800 Subject: [PATCH] libfprint: Add patches to support more hardware libfprint does not release very often, so include some already merged patches to add support for new hardware until the next official release. Low risk, since it just adds new IDs. Signed-off-by: Daniel Schaefer --- pkgs/by-name/li/libfprint-tod/package.nix | 4 +++ pkgs/by-name/li/libfprint/package.nix | 30 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/pkgs/by-name/li/libfprint-tod/package.nix b/pkgs/by-name/li/libfprint-tod/package.nix index 9abebbb42b25..120082b2029e 100644 --- a/pkgs/by-name/li/libfprint-tod/package.nix +++ b/pkgs/by-name/li/libfprint-tod/package.nix @@ -27,6 +27,10 @@ libfprint.overrideAttrs ( hash = "sha256-xkywuFbt8EFJOlIsSN2hhZfMUhywdgJ/uT17uiO3YV4="; }; + # Different source than libfprint, so override any patches, because they + # would only apply to the original source tree + patches = [ ]; + mesonFlags = [ # Include virtual drivers for fprintd tests "-Ddrivers=all" diff --git a/pkgs/by-name/li/libfprint/package.nix b/pkgs/by-name/li/libfprint/package.nix index 160cec4aa0f9..edfc4aa8ea74 100644 --- a/pkgs/by-name/li/libfprint/package.nix +++ b/pkgs/by-name/li/libfprint/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitLab, + fetchpatch, pkg-config, meson, python3, @@ -35,6 +36,35 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-aNBUIKY3PP5A07UNg3N0qq+2cwb6Fk67oKQcXgr2G/4="; }; + patches = [ + # New hardware support since 1.94.10, just new USB Product IDs + (fetchpatch { + name = "realtek-3274-9003.patch"; + url = "https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/a25f71cf97820c51edc4c32f84686fcdc608d9d1.patch"; + sha256 = "sha256-T9rvT53Ij+5gtiVOp+xfzQwiVkyF0m6lZAUCXWmaugg="; + }) + (fetchpatch { + name = "elan-0c58.patch"; + url = "https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/4610f2285e6373c2fe4ead0dff4ebf8dabe4e532.patch"; + sha256 = "sha256-VR96V+7FvSa8sE6JpcCx/slZ0MaK9HLuNuAay2P9C6M="; + }) + (fetchpatch { + name = "elan-04F3-0C9C.patch"; + url = "https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/2bdc2b7ca6d8bedc675054934fbc8f8b6a21deac.patch"; + sha256 = "sha256-LFMip9Mq55uDRgHkW+XeI+j0mILOb7DIHscHjyKe4yE="; + }) + (fetchpatch { + name = "focal-077a-079a.patch"; + url = "https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/2c7842c905147a2d127c1b168b2e9d432b8c91a4.patch"; + sha256 = "sha256-PuISGITn0/6AWY0WVUfViZtdcQFh+0s+4OLIszqdLUs="; + }) + (fetchpatch { + name = "focal-a97a.patch"; + url = "https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/0dc384b90ed8cd78b3e8d7c0d30a953bd088b98c.patch"; + sha256 = "sha256-X/wl4MpxfQ7sLlFTkkiDQGyRFQ6lC9pdcy3XPrSeOZw="; + }) + ]; + postPatch = '' patchShebangs \ tests/test-runner.sh \