From b231fe9e7f4daf85853bd4cf85c7da8b61c38c3e Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 29 Jun 2025 15:42:07 -0400 Subject: vfs0090: override base package instead of copy --- ...-missing-explicit-dependencies-in-meson.b.patch | 28 ------- ...0-fix-calls-to-fpi_ssm_next_state_delayed.patch | 34 +++++++++ ...fs0090-add-missing-linux-limits.h-include.patch | 26 ------- ...0-fix-calls-to-fpi_ssm_next_state_delayed.patch | 34 --------- pkgs/libfprint-2-tod1-vfs0090/default.nix | 86 ++++------------------ 5 files changed, 48 insertions(+), 160 deletions(-) delete mode 100644 pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch create mode 100644 pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch delete mode 100644 pkgs/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch delete mode 100644 pkgs/libfprint-2-tod1-vfs0090/0003-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch (limited to 'pkgs') diff --git a/pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch b/pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch deleted file mode 100644 index ac06e83..0000000 --- a/pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c02f2e040dd1e7664777c5a705272e4eb7bfb569 Mon Sep 17 00:00:00 2001 -From: Vincent Breitmoser -Date: Thu, 10 Jun 2021 14:09:19 +0200 -Subject: [PATCH] vfs0090: add missing explicit dependencies in meson.build - -Make all dependencies explicit, so they can be found when building with Nix. - ---- - meson.build | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/meson.build b/meson.build -index 54a7ca4..88f8793 100644 ---- a/meson.build -+++ b/meson.build -@@ -17,6 +17,9 @@ udev_dep = dependency('udev') - vfs009x_deps += libfprint_tod_dep - vfs009x_deps += dependency('nss') - vfs009x_deps += dependency('openssl') -+vfs009x_deps += dependency('gusb') -+vfs009x_deps += dependency('libfprint-2') -+vfs009x_deps += dependency('glib-2.0') - - vfs0090_deps += dependency('pixman-1') - --- -2.31.1 - diff --git a/pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch b/pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch new file mode 100644 index 0000000..7c21677 --- /dev/null +++ b/pkgs/libfprint-2-tod1-vfs0090/0001-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch @@ -0,0 +1,34 @@ +From 4796426bb964519fe18acb01b1c6651f574dbdfb Mon Sep 17 00:00:00 2001 +From: Freya Murphy +Date: Sun, 29 Jun 2025 14:50:10 -0400 +Subject: [PATCH 3/3] vfs0090: fix calls to fpi_ssm_next_state_delayed + +--- + vfs0090.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vfs0090.c b/vfs0090.c +index 6070df7..b18a5a9 100644 +--- a/vfs0090.c ++++ b/vfs0090.c +@@ -1630,7 +1630,7 @@ led_blink_callback_with_ssm (FpiUsbTransfer *transfer, FpDevice *dev, + + if (!error) + { +- fpi_ssm_next_state_delayed (ssm, 200, NULL); ++ fpi_ssm_next_state_delayed (ssm, 200); + } + else + { +@@ -2952,7 +2952,7 @@ reactivate_ssm (FpiSsm *ssm, FpDevice *dev) + switch (fpi_ssm_get_cur_state (ssm)) + { + case REACTIVATE_STATE_WAIT: +- fpi_ssm_next_state_delayed (ssm, 100, NULL); ++ fpi_ssm_next_state_delayed (ssm, 100); + break; + + case REACTIVATE_STATE_DEACTIVATE: +-- +2.49.0 + diff --git a/pkgs/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch b/pkgs/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch deleted file mode 100644 index 6111cf0..0000000 --- a/pkgs/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5405e02c629e689449e852424aed8cca217ed309 Mon Sep 17 00:00:00 2001 -From: Vincent Breitmoser -Date: Thu, 10 Jun 2021 14:10:52 +0200 -Subject: [PATCH] vfs0090: add missing include - -This header is needed for the NAME_MAX constant used in this file. - ---- - vfs0090.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vfs0090.c b/vfs0090.c -index 8034faf..6070df7 100644 ---- a/vfs0090.c -+++ b/vfs0090.c -@@ -24,6 +24,7 @@ - - #include - #include -+#include - #include - #include - #include --- -2.31.1 - diff --git a/pkgs/libfprint-2-tod1-vfs0090/0003-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch b/pkgs/libfprint-2-tod1-vfs0090/0003-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch deleted file mode 100644 index 7c21677..0000000 --- a/pkgs/libfprint-2-tod1-vfs0090/0003-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 4796426bb964519fe18acb01b1c6651f574dbdfb Mon Sep 17 00:00:00 2001 -From: Freya Murphy -Date: Sun, 29 Jun 2025 14:50:10 -0400 -Subject: [PATCH 3/3] vfs0090: fix calls to fpi_ssm_next_state_delayed - ---- - vfs0090.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vfs0090.c b/vfs0090.c -index 6070df7..b18a5a9 100644 ---- a/vfs0090.c -+++ b/vfs0090.c -@@ -1630,7 +1630,7 @@ led_blink_callback_with_ssm (FpiUsbTransfer *transfer, FpDevice *dev, - - if (!error) - { -- fpi_ssm_next_state_delayed (ssm, 200, NULL); -+ fpi_ssm_next_state_delayed (ssm, 200); - } - else - { -@@ -2952,7 +2952,7 @@ reactivate_ssm (FpiSsm *ssm, FpDevice *dev) - switch (fpi_ssm_get_cur_state (ssm)) - { - case REACTIVATE_STATE_WAIT: -- fpi_ssm_next_state_delayed (ssm, 100, NULL); -+ fpi_ssm_next_state_delayed (ssm, 100); - break; - - case REACTIVATE_STATE_DEACTIVATE: --- -2.49.0 - diff --git a/pkgs/libfprint-2-tod1-vfs0090/default.nix b/pkgs/libfprint-2-tod1-vfs0090/default.nix index cd4da0f..7bfcced 100644 --- a/pkgs/libfprint-2-tod1-vfs0090/default.nix +++ b/pkgs/libfprint-2-tod1-vfs0090/default.nix @@ -1,72 +1,14 @@ -{ - stdenv, - lib, - fetchFromGitLab, - pkg-config, - libfprint, - libfprint-tod, - gusb, - udev, - nss, - openssl, - meson, - pixman, - ninja, - glib, - ... -}: -stdenv.mkDerivation { - pname = "libfprint-2-tod1-vfs0090"; - version = "0.8.5"; - - src = fetchFromGitLab { - domain = "gitlab.freedesktop.org"; - owner = "3v1n0"; - repo = "libfprint-tod-vfs0090"; - rev = "6084a1545589beec0c741200b18b0902cca225ba"; - sha256 = "sha256-tSML/8USd/LuHF/YGLvNgykixF6VYtfE4SXzeV47840="; - }; - - patches = [ - # TODO remove once https://gitlab.freedesktop.org/3v1n0/libfprint-tod-vfs0090/-/merge_requests/1 is merged - ./0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch - # TODO remove once https://gitlab.freedesktop.org/3v1n0/libfprint-tod-vfs0090/-/merge_requests/2 is merged - ./0002-vfs0090-add-missing-linux-limits.h-include.patch - ./0003-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch - ]; - - nativeBuildInputs = [ - pkg-config - meson - ninja - ]; - buildInputs = [ - libfprint - libfprint-tod - glib - gusb - udev - nss - openssl - pixman - ]; - - installPhase = '' - runHook preInstall - - install -D -t "$out/lib/libfprint-2/tod-1/" libfprint-tod-vfs009x.so - install -D -t "$out/lib/udev/rules.d/" $src/60-libfprint-2-tod-vfs0090.rules - - runHook postInstall - ''; - - passthru.driverPath = "/lib/libfprint-2/tod-1"; - - meta = with lib; { - description = "Libfprint-2-tod Touch OEM Driver for 2016 ThinkPad's fingerprint readers"; - homepage = "https://gitlab.freedesktop.org/3v1n0/libfprint-tod-vfs0090"; - license = licenses.lgpl21Plus; - platforms = platforms.linux; - maintainers = with maintainers; [valodim]; - }; -} +{libfprint-2-tod1-vfs0090, ...}: +libfprint-2-tod1-vfs0090.overrideAttrs (orig: { + patches = + orig.patches + ++ [ + ./0001-vfs0090-fix-calls-to-fpi_ssm_next_state_delayed.patch + ]; + + meta = + orig.meta + // { + broken = false; + }; +}) -- cgit v1.2.3-freya