Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libfprint-2-tod1-elan / default.nix
blob3e7253a40175a3a06cf77b3dcaba8b4d543ee91d
1 { stdenvNoCC
2 , lib
3 , fetchzip
4 , libfprint-tod
5 , openssl
6 , gusb
7 , glib
8 , autoPatchelfHook
9 }:
11 stdenvNoCC.mkDerivation {
12   pname = "libfprint-2-tod1-elan";
13   version = "0.0.8";
15   src = fetchzip {
16     url = "https://download.lenovo.com/pccbbs/mobiles/r1slf01w.zip";
17     hash = "sha256-GD/BebPto1fFLgyvpiitt+ngwEtdsnKsvdFNeSmVDmw=";
18     # .so is in a subzip
19     postFetch = ''
20       unpackFile $out/*
21       rm $out/*.zip
22       mv * $out/
23     '';
24   };
26   nativeBuildInputs = [ autoPatchelfHook];
28   buildInputs = [
29     libfprint-tod
30     openssl
31     gusb
32     glib
33   ];
35   installPhase = ''
36     runHook preInstall
38     install -Dm444 libfprint-2-tod1-elan.so -t "$out/lib/libfprint-2/tod-1/"
40     runHook postInstall
41   '';
43   passthru.driverPath = "/lib/libfprint-2/tod-1";
45   meta = with lib; {
46     description = "Elan(04f3:0c4b) driver module for libfprint-2-tod Touch OEM Driver";
47     homepage = "https://support.lenovo.com/us/en/downloads/ds560939-elan-fingerprint-driver-for-ubuntu-2204-thinkpad-e14-gen-4-e15-gen-4";
48     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
49     license = licenses.unfree;
50     platforms = [ "x86_64-linux" ];
51     maintainers = with maintainers; [ qdlmcfresh ];
52   };