2021-01-15 22:18:51 +00:00
|
|
|
|
{ lib, stdenv
|
2020-05-29 06:06:01 +00:00
|
|
|
|
, fetchFromGitLab
|
2021-02-05 17:12:51 +00:00
|
|
|
|
, pkg-config
|
2021-03-09 03:18:52 +00:00
|
|
|
|
, gobject-introspection
|
2020-05-29 06:06:01 +00:00
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
|
|
|
|
, perl
|
|
|
|
|
, gettext
|
|
|
|
|
, cairo
|
|
|
|
|
, gtk-doc
|
|
|
|
|
, libxslt
|
|
|
|
|
, docbook-xsl-nons
|
|
|
|
|
, docbook_xml_dtd_412
|
2021-03-09 03:18:52 +00:00
|
|
|
|
, fetchurl
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, glib
|
2021-03-09 03:18:52 +00:00
|
|
|
|
, gusb
|
2020-05-29 06:06:01 +00:00
|
|
|
|
, dbus
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, polkit
|
|
|
|
|
, nss
|
|
|
|
|
, pam
|
|
|
|
|
, systemd
|
2020-05-29 06:06:01 +00:00
|
|
|
|
, libfprint
|
|
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-29 06:06:01 +00:00
|
|
|
|
pname = "fprintd";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
version = "1.92.0";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
outputs = [ "out" "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
|
owner = "libfprint";
|
|
|
|
|
repo = pname;
|
2021-03-09 03:18:52 +00:00
|
|
|
|
rev = "v${version}";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
sha256 = "0bqzxxb5iq3pdwdv1k8wsx3alirbjla6zgcki55b5p6mzrvk781x";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
|
pkg-config
|
2020-05-29 06:06:01 +00:00
|
|
|
|
meson
|
|
|
|
|
ninja
|
2021-03-09 03:18:52 +00:00
|
|
|
|
perl # for pod2man
|
2020-05-29 06:06:01 +00:00
|
|
|
|
gettext
|
|
|
|
|
gtk-doc
|
|
|
|
|
libxslt
|
2021-03-09 03:18:52 +00:00
|
|
|
|
# TODO: apply this to D-Bus so that other packages can benefit.
|
|
|
|
|
# https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/202
|
|
|
|
|
(dbus.overrideAttrs (attrs: {
|
|
|
|
|
postInstall = attrs.postInstall or "" + ''
|
|
|
|
|
ln -s ${fetchurl {
|
|
|
|
|
url = "https://gitlab.freedesktop.org/dbus/dbus/-/raw/b207135dbd8c09cf8da28f7e3b0a18bb11483663/doc/catalog.xml";
|
|
|
|
|
sha256 = "1/43XwAIcmRXfM4OXOPephyQyUnW8DSveiZbiPvW72I=";
|
|
|
|
|
}} $out/share/xml/dbus-1/catalog.xml
|
|
|
|
|
'';
|
|
|
|
|
}))
|
2020-05-29 06:06:01 +00:00
|
|
|
|
docbook-xsl-nons
|
|
|
|
|
docbook_xml_dtd_412
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
glib
|
|
|
|
|
polkit
|
|
|
|
|
nss
|
|
|
|
|
pam
|
|
|
|
|
systemd
|
2020-05-29 06:06:01 +00:00
|
|
|
|
libfprint
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
2021-03-09 03:18:52 +00:00
|
|
|
|
gobject-introspection # for setup hook
|
2020-05-29 06:06:01 +00:00
|
|
|
|
python-dbusmock
|
|
|
|
|
dbus-python
|
|
|
|
|
pygobject3
|
|
|
|
|
pycairo
|
|
|
|
|
pypamtest
|
2021-03-09 03:18:52 +00:00
|
|
|
|
gusb # Required by libfprint’s typelib
|
2020-05-29 06:06:01 +00:00
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
|
mesonFlags = [
|
|
|
|
|
"-Dgtk_doc=true"
|
|
|
|
|
"-Dpam_modules_dir=${placeholder "out"}/lib/security"
|
|
|
|
|
"-Dsysconfdir=${placeholder "out"}/etc"
|
|
|
|
|
"-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/system-services"
|
|
|
|
|
"-Dsystemd_system_unit_dir=${placeholder "out"}/lib/systemd/system"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
|
PKG_CONFIG_DBUS_1_INTERFACES_DIR = "${placeholder "out"}/share/dbus-1/interfaces";
|
|
|
|
|
PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
|
|
|
|
|
PKG_CONFIG_DBUS_1_DATADIR = "${placeholder "out"}/share";
|
|
|
|
|
|
|
|
|
|
# FIXME: Ugly hack for tests to find libpam_wrapper.so
|
2021-01-15 22:18:51 +00:00
|
|
|
|
LIBRARY_PATH = lib.makeLibraryPath [ python3.pkgs.pypamtest ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-03-09 03:18:52 +00:00
|
|
|
|
patchShebangs \
|
|
|
|
|
po/check-translations.sh \
|
|
|
|
|
tests/unittest_inspector.py
|
2020-05-29 06:06:01 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
homepage = "https://fprint.freedesktop.org/";
|
|
|
|
|
description = "D-Bus daemon that offers libfprint functionality over the D-Bus interprocess communication bus";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
platforms = platforms.linux;
|
2020-05-29 06:06:01 +00:00
|
|
|
|
maintainers = with maintainers; [ abbradar elyhaka ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|