2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-05-29 06:06:01 +00:00
|
|
|
, fetchFromGitLab
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
2021-03-09 03:18:52 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, ninja
|
2020-05-29 06:06:01 +00:00
|
|
|
, gusb
|
2020-04-24 23:36:52 +00:00
|
|
|
, pixman
|
|
|
|
, glib
|
|
|
|
, nss
|
2020-05-29 06:06:01 +00:00
|
|
|
, gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
, coreutils
|
2021-08-05 21:33:18 +00:00
|
|
|
, cairo
|
|
|
|
, libgudev
|
2020-04-24 23:36:52 +00:00
|
|
|
, gtk-doc
|
2021-03-09 03:18:52 +00:00
|
|
|
, docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
, docbook_xml_dtd_43
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-29 06:06:01 +00:00
|
|
|
pname = "libfprint";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.94.5";
|
2020-05-29 06:06:01 +00:00
|
|
|
outputs = [ "out" "devdoc" ];
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "libfprint";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-+eSvzbXxjemVKMeD8tp/0/tGBjw2EOlmyxb8KfyZKtA=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs \
|
|
|
|
tests/test-runner.sh \
|
|
|
|
tests/unittest_inspector.py \
|
|
|
|
tests/virtual-image.py \
|
|
|
|
tests/umockdev-test.py \
|
|
|
|
tests/test-generated-hwdb.sh
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
gtk-doc
|
2021-03-09 03:18:52 +00:00
|
|
|
docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
docbook_xml_dtd_43
|
2020-05-29 06:06:01 +00:00
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-05-29 06:06:01 +00:00
|
|
|
gusb
|
2020-04-24 23:36:52 +00:00
|
|
|
pixman
|
|
|
|
glib
|
|
|
|
nss
|
2021-08-05 21:33:18 +00:00
|
|
|
cairo
|
|
|
|
libgudev
|
2020-05-29 06:06:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dudev_rules_dir=${placeholder "out"}/lib/udev/rules.d"
|
2021-03-09 03:18:52 +00:00
|
|
|
# Include virtual drivers for fprintd tests
|
|
|
|
"-Ddrivers=all"
|
2021-08-05 21:33:18 +00:00
|
|
|
"-Dudev_hwdb_dir=${placeholder "out"}/lib/udev/hwdb.d"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeInstallCheckInputs = [
|
2022-11-21 17:40:18 +00:00
|
|
|
(python3.withPackages (p: with p; [ pygobject3 ]))
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# We need to run tests _after_ install so all the paths that get loaded are in
|
|
|
|
# the right place.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
|
|
|
|
ninjaCheckPhase
|
|
|
|
|
|
|
|
runHook postInstallCheck
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://fprint.freedesktop.org/";
|
|
|
|
description = "A library designed to make it easy to add support for consumer fingerprint readers";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|