Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libfprint-2-tod1-goodix / default.nix
blobc7710ce1d1991dcd3d55c0acfa525749ae54f516
1 { stdenv, lib, fetchgit, libfprint-tod }:
3 stdenv.mkDerivation {
4   pname = "libfprint-2-tod1-goodix";
5   version = "0.0.6";
7   src = fetchgit {
8     url = "https://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix";
9     rev = "882735c6366fbe30149eea5cfd6d0ddff880f0e4"; # droped-lp1880058 on 2020-11-25
10     sha256 = "sha256-Uv+Rr4V31DyaZFOj79Lpyfl3G6zVWShh20roI0AvMPU=";
11   };
13   buildPhase = ''
14     patchelf \
15       --set-rpath ${lib.makeLibraryPath [ libfprint-tod ]} \
16       usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-53xc-$version.so
17   '';
19   installPhase = ''
20     mkdir -p "$out/lib/libfprint-2/tod-1/"
21     mkdir -p "$out/lib/udev/rules.d/"
23     cp usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-53xc-$version.so "$out/lib/libfprint-2/tod-1/"
24     cp lib/udev/rules.d/60-libfprint-2-tod1-goodix.rules "$out/lib/udev/rules.d/"
25   '';
27   passthru.driverPath = "/lib/libfprint-2/tod-1";
29   meta = with lib; {
30     description = "Goodix driver module for libfprint-2-tod Touch OEM Driver";
31     homepage = "https://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix/";
32     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
33     license = licenses.unfree;
34     platforms = platforms.linux;
35     maintainers = with maintainers; [ grahamc ];
36   };