about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-23 08:16:49 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-23 08:16:49 +0000
commit4dc730a187d41f9f2dce4fe2680c32dcecb79b93 (patch)
tree67673deb1649dc0a40962e70e6da302d7b6c4bf0 /nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090
parent633cab0ecb07627706c6b523e219490f019eaab5 (diff)
parent7e567a3d092b7de69cdf5deaeb8d9526de230916 (diff)
downloadnixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.gz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.bz2
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.lz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.xz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.zst
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.zip
Merge commit '7e567a3d092b7de69cdf5deaeb8d9526de230916'
# Conflicts:
#	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090')
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix42
3 files changed, 96 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch
new file mode 100644
index 000000000000..ac06e83ab938
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch
@@ -0,0 +1,28 @@
+From c02f2e040dd1e7664777c5a705272e4eb7bfb569 Mon Sep 17 00:00:00 2001
+From: Vincent Breitmoser <look@my.amazin.horse>
+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/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch
new file mode 100644
index 000000000000..6111cf0ad294
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch
@@ -0,0 +1,26 @@
+From 5405e02c629e689449e852424aed8cca217ed309 Mon Sep 17 00:00:00 2001
+From: Vincent Breitmoser <look@my.amazin.horse>
+Date: Thu, 10 Jun 2021 14:10:52 +0200
+Subject: [PATCH] vfs0090: add missing <linux/limits.h> 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 <errno.h>
+ #include <ctype.h>
++#include <linux/limits.h>
+ #include <nss.h>
+ #include <pk11pub.h>
+ #include <sechash.h>
+-- 
+2.31.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix
new file mode 100644
index 000000000000..840f8e227153
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix
@@ -0,0 +1,42 @@
+{ 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
+  ];
+
+  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 = "A 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 ];
+  };
+}