easytier: 2.1.1 -> 2.1.2 (#376259)
[NixPkgs.git] / pkgs / by-name / li / libfprint-2-tod1-goodix-550a / package.nix
blobf597fd7f89f2cb51df6f9da53c6c19558c3651f5
2   stdenv,
3   lib,
4   fetchzip,
5   unzip,
6   libfprint-tod,
7 }:
9 stdenv.mkDerivation {
10   pname = "libfprint-2-tod1-goodix-550a";
11   version = "0.0.9";
13   src = fetchzip {
14     url = "https://download.lenovo.com/pccbbs/mobiles/r1slg01w.zip";
15     sha256 = "sha256-6tp8Unu6rs27oB5VAqfRqHmv5D9N3njl5qv6We0b/Ec=";
16   };
18   nativeBuildInputs = [ unzip ];
20   unpackPhase = ''
21     unzip $src/libfprint-tod-goodix-550a-0.0.9.zip
22     cd libfprint-tod-goodix-550a-0.0.9
23     ar x libfprint-2-tod-goodix_amd64.deb
24     tar xf data.tar.xz
25   '';
27   buildPhase = ''
28     patchelf \
29       --set-rpath ${lib.makeLibraryPath [ libfprint-tod ]} \
30       usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-550a-$version.so
31   '';
33   installPhase = ''
34     mkdir -p "$out/lib/libfprint-2/tod-1/"
35     mkdir -p "$out/lib/udev/rules.d/"
37     cp usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-550a-$version.so "$out/lib/libfprint-2/tod-1/"
38     cp lib/udev/rules.d/60-libfprint-2-tod1-goodix.rules "$out/lib/udev/rules.d/"
39   '';
41   passthru.driverPath = "/lib/libfprint-2/tod-1";
43   meta = with lib; {
44     description = "Goodix 550a driver module for libfprint-2-tod Touch OEM Driver (from Lenovo)";
45     homepage = "https://support.lenovo.com/us/en/downloads/ds560884-goodix-fingerprint-driver-for-linux-thinkpad-e14-gen-4-e15-gen-4";
46     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
47     license = licenses.unfree;
48     platforms = platforms.linux;
49     maintainers = with maintainers; [ utkarshgupta137 ];
50   };