2020-01-25 20:54:37 +01:00
|
|
|
{ thinkpad ? false
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2019-09-18 02:01:59 +02:00
|
|
|
, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, meson
|
|
|
|
, ninja
|
2020-04-04 01:14:43 +02:00
|
|
|
, libusb1
|
2019-09-18 02:01:59 +02:00
|
|
|
, pixman
|
|
|
|
, glib
|
|
|
|
, nss
|
2020-01-25 20:54:37 +01:00
|
|
|
, gtk3
|
2019-09-18 02:01:59 +02:00
|
|
|
, coreutils
|
|
|
|
, gtk-doc
|
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xml_dtd_43
|
2020-01-25 20:54:37 +01:00
|
|
|
, openssl ? null
|
2019-09-18 02:01:59 +02:00
|
|
|
}:
|
2019-05-15 20:52:42 +02:00
|
|
|
|
2020-01-25 20:54:37 +01:00
|
|
|
assert thinkpad -> openssl != null;
|
|
|
|
|
2015-01-03 17:44:08 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2020-01-25 20:54:37 +01:00
|
|
|
pname = "libfprint" + stdenv.lib.optionalString thinkpad "-thinkpad";
|
|
|
|
version = "1.0";
|
2015-01-03 17:44:08 +01:00
|
|
|
|
2020-01-25 20:54:37 +01:00
|
|
|
src = {
|
|
|
|
libfprint-thinkpad =
|
|
|
|
fetchFromGitHub {
|
|
|
|
owner = "3v1n0";
|
|
|
|
repo = "libfprint";
|
|
|
|
rev = "2e2e3821717e9042e93a995bdbd3d00f2df0be9c";
|
|
|
|
sha256 = "1vps1wrp7hskf13f7jrv0dwry2fcid76x2w463wplngp63cj7b3b";
|
|
|
|
};
|
|
|
|
libfprint = fetchurl {
|
|
|
|
url = "https://gitlab.freedesktop.org/libfprint/libfprint/uploads/aff93e9921d1cff53d7c070944952ff9/libfprint-${version}.tar.xz";
|
|
|
|
sha256 = "0v84pd12v016m8iimhq39fgzamlarqccsr7d98cvrrwrzrgcixrd";
|
|
|
|
};
|
|
|
|
}.${pname};
|
2019-05-15 20:52:42 +02:00
|
|
|
|
2019-09-18 02:01:59 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
gtk-doc
|
|
|
|
docbook_xsl
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
];
|
2015-01-03 17:44:08 +01:00
|
|
|
|
2019-09-18 02:01:59 +02:00
|
|
|
buildInputs = [
|
2020-04-04 01:14:43 +02:00
|
|
|
libusb1 # drop in 2.0 for gusb
|
2019-09-18 02:01:59 +02:00
|
|
|
pixman
|
|
|
|
glib
|
|
|
|
nss
|
2020-01-25 20:54:37 +01:00
|
|
|
gtk3
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional thinkpad openssl
|
|
|
|
;
|
2015-01-03 17:44:08 +01:00
|
|
|
|
2019-09-18 02:01:59 +02:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dudev_rules_dir=${placeholder "out"}/lib/udev/rules.d"
|
|
|
|
"-Dx11-examples=false"
|
|
|
|
];
|
2018-12-17 19:04:26 +01:00
|
|
|
|
2019-09-18 02:01:59 +02:00
|
|
|
postPatch = ''
|
2018-12-17 19:04:26 +01:00
|
|
|
substituteInPlace libfprint/meson.build \
|
|
|
|
--replace /bin/echo ${coreutils}/bin/echo
|
|
|
|
'';
|
2015-01-03 17:44:08 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://fprint.freedesktop.org/";
|
2015-01-03 17:44:08 +01:00
|
|
|
description = "A library designed to make it easy to add support for consumer fingerprint readers";
|
2018-12-17 19:04:26 +01:00
|
|
|
license = licenses.lgpl21;
|
2015-01-03 17:44:08 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|