biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / security / fprintd / default.nix
blob034c0a226288d6426ac86f925632c6f5d31a044f
1 { lib, stdenv
2 , fetchFromGitLab
3 , pkg-config
4 , gobject-introspection
5 , meson
6 , ninja
7 , perl
8 , gettext
9 , gtk-doc
10 , libxslt
11 , docbook-xsl-nons
12 , docbook_xml_dtd_412
13 , glib
14 , gusb
15 , dbus
16 , polkit
17 , nss
18 , pam
19 , systemd
20 , libfprint
21 , python3
24 stdenv.mkDerivation rec {
25   pname = "fprintd";
26   version = "1.94.3";
27   outputs = [ "out" "devdoc" ];
29   src = fetchFromGitLab {
30     domain = "gitlab.freedesktop.org";
31     owner = "libfprint";
32     repo = pname;
33     rev = "v${version}";
34     sha256 = "sha256-shH+ctQAx4fpTMWTmo3wB45ZS38Jf8RknryPabfZ6QE=";
35   };
37   nativeBuildInputs = [
38     pkg-config
39     meson
40     ninja
41     perl # for pod2man
42     gettext
43     gtk-doc
44     libxslt
45     dbus
46     docbook-xsl-nons
47     docbook_xml_dtd_412
48   ];
50   buildInputs = [
51     glib
52     polkit
53     nss
54     pam
55     systemd
56     libfprint
57   ];
59   nativeCheckInputs = with python3.pkgs; [
60     gobject-introspection # for setup hook
61     python-dbusmock
62     dbus-python
63     pygobject3
64     pycairo
65     pypamtest
66     gusb # Required by libfprint’s typelib
67   ];
69   mesonFlags = [
70     "-Dgtk_doc=true"
71     "-Dpam_modules_dir=${placeholder "out"}/lib/security"
72     "-Dsysconfdir=${placeholder "out"}/etc"
73     "-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/system-services"
74     "-Dsystemd_system_unit_dir=${placeholder "out"}/lib/systemd/system"
75   ];
77   PKG_CONFIG_DBUS_1_INTERFACES_DIR = "${placeholder "out"}/share/dbus-1/interfaces";
78   PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
79   PKG_CONFIG_DBUS_1_DATADIR = "${placeholder "out"}/share";
81   # FIXME: Ugly hack for tests to find libpam_wrapper.so
82   LIBRARY_PATH = lib.makeLibraryPath [ python3.pkgs.pypamtest ];
84   doCheck = true;
86   mesonCheckFlags = [
87     # PAM related checks are timing out
88     "--no-suite" "fprintd:TestPamFprintd"
89   ];
91   patches = [
92     # Skip flaky test "test_removal_during_enroll"
93     # https://gitlab.freedesktop.org/libfprint/fprintd/-/issues/129
94     ./skip-test-test_removal_during_enroll.patch
95   ];
97   postPatch = ''
98     patchShebangs \
99       po/check-translations.sh \
100       tests/unittest_inspector.py
102     # Stop tests from failing due to unhandled GTasks uncovered by GLib 2.76 bump.
103     # https://gitlab.freedesktop.org/libfprint/fprintd/-/issues/151
104     substituteInPlace tests/fprintd.py \
105       --replace "env['G_DEBUG'] = 'fatal-criticals'" ""
106     substituteInPlace tests/meson.build \
107       --replace "'G_DEBUG=fatal-criticals'," ""
108   '';
110   meta = with lib; {
111     homepage = "https://fprint.freedesktop.org/";
112     description = "D-Bus daemon that offers libfprint functionality over the D-Bus interprocess communication bus";
113     license = licenses.gpl2Plus;
114     platforms = platforms.linux;
115     maintainers = with maintainers; [ abbradar ];
116   };