about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-19 17:14:52 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-19 17:14:52 +0100
commitf4d4283e3992c3f559831b1c030cd1fda6d45f98 (patch)
treec2cc63060849298d9a8e7a329010bb0fc4abb219 /nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan
parentdac53cd746c10feddd48d4a1981235a653d7d32a (diff)
parent0ace63bed8f561e4cc5b1c8fa5fee6be61fbcf8b (diff)
downloadnixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.gz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.bz2
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.lz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.xz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.zst
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan')
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix
new file mode 100644
index 000000000000..3e7253a40175
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix
@@ -0,0 +1,53 @@
+{ stdenvNoCC
+, lib
+, fetchzip
+, libfprint-tod
+, openssl
+, gusb
+, glib
+, autoPatchelfHook
+}:
+
+stdenvNoCC.mkDerivation {
+  pname = "libfprint-2-tod1-elan";
+  version = "0.0.8";
+
+  src = fetchzip {
+    url = "https://download.lenovo.com/pccbbs/mobiles/r1slf01w.zip";
+    hash = "sha256-GD/BebPto1fFLgyvpiitt+ngwEtdsnKsvdFNeSmVDmw=";
+    # .so is in a subzip
+    postFetch = ''
+      unpackFile $out/*
+      rm $out/*.zip
+      mv * $out/
+    '';
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook];
+
+  buildInputs = [
+    libfprint-tod
+    openssl
+    gusb
+    glib
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm444 libfprint-2-tod1-elan.so -t "$out/lib/libfprint-2/tod-1/"
+
+    runHook postInstall
+  '';
+
+  passthru.driverPath = "/lib/libfprint-2/tod-1";
+
+  meta = with lib; {
+    description = "Elan(04f3:0c4b) driver module for libfprint-2-tod Touch OEM Driver";
+    homepage = "https://support.lenovo.com/us/en/downloads/ds560939-elan-fingerprint-driver-for-ubuntu-2204-thinkpad-e14-gen-4-e15-gen-4";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ qdlmcfresh ];
+  };
+}