about summary refs log tree commit diff
path: root/users/glittershark/pkgs/fprintd/libfprint-tod-goodix.nix
blob: f6d7d4ea98c90524b5670ba8bd2e0bc9e5b81b87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ stdenv
, pkgs
, fetchgit
, libfprint-tod ? (pkgs.callPackage ./libfprint-tod-clean.nix {})
, git
, autoPatchelfHook
, libusb
, glibc
,
}:
stdenv.mkDerivation rec {
  pname = "libfprint-2-tod1-xps9300-bin";
  version = "0.0.6";

  src = fetchgit {
    url = "git://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix/";
    rev = "882735c6366fbe30149eea5cfd6d0ddff880f0e4";
    sha256 = "1x9h5x027s2avdhjhnfmmhdpgyf9x79fz8skcjd3rm3phnpr3zsj";
  };

  buildInputs = [
    libfprint-tod
    git
    libusb
    autoPatchelfHook
    glibc
  ];

  installPhase = ''
    install -dm 755 "$out/lib/udev/rules.d/"
    install -dm 755 "$out/usr/lib/libfprint-2/tod-1/"

    sed -n -r '/Shenzhen/,/^\s*$/p' debian/copyright > LICENSE
    install -Dm644 LICENSE "$out/usr/share/licenses/libfprint-2-tod1-xps9300-bin/LICENSE"

    install -Dm 755 usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-53xc-0.0.6.so "$out/usr/lib/libfprint-2/tod-1/"
    install -Dm 0755 lib/udev/rules.d/60-libfprint-2-tod1-goodix.rules "$out/lib/udev/rules.d/"
  '';

  meta = with stdenv.lib; {
    homepage = "https://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix";
    description = "Goodix driver module for libfprint-2 Touch OEM Driver";
    license = licenses.unfreeRedistributable;
    platforms = platforms.linux;
    maintainers = with maintainers; [ jobojeha ];
  };
}