python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / fprintd / default.nix
blob125cab6b3fd06d20ffc83d933ea7145613cef564
1 { lib, stdenv
2 , fetchFromGitLab
3 , fetchpatch
4 , pkg-config
5 , gobject-introspection
6 , meson
7 , ninja
8 , perl
9 , gettext
10 , cairo
11 , gtk-doc
12 , libxslt
13 , docbook-xsl-nons
14 , docbook_xml_dtd_412
15 , fetchurl
16 , glib
17 , gusb
18 , dbus
19 , polkit
20 , nss
21 , pam
22 , systemd
23 , libfprint
24 , python3
27 stdenv.mkDerivation rec {
28   pname = "fprintd";
29   version = "1.94.2";
30   outputs = [ "out" "devdoc" ];
32   src = fetchFromGitLab {
33     domain = "gitlab.freedesktop.org";
34     owner = "libfprint";
35     repo = pname;
36     rev = "v${version}";
37     sha256 = "sha256-ePhcIZyXoGr8XlBuzKjpibU9D/44iCXYBlpVR9gcswQ=";
38   };
40   patches = [
41     # backport upstream patch fixing tests
42     (fetchpatch {
43       url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/ae04fa989720279e5558c3b8ff9ebe1959b1cf36.patch";
44       sha256 = "sha256-jW5vlzrbZQ1gUDLBf7G50GnZfZxhlnL2Eu+9Bghdwdw=";
45     })
46   ];
48   nativeBuildInputs = [
49     pkg-config
50     meson
51     ninja
52     perl # for pod2man
53     gettext
54     gtk-doc
55     libxslt
56     dbus
57     docbook-xsl-nons
58     docbook_xml_dtd_412
59   ];
61   buildInputs = [
62     glib
63     polkit
64     nss
65     pam
66     systemd
67     libfprint
68   ];
70   checkInputs = with python3.pkgs; [
71     gobject-introspection # for setup hook
72     python-dbusmock
73     dbus-python
74     pygobject3
75     pycairo
76     pypamtest
77     gusb # Required by libfprint’s typelib
78   ];
80   mesonFlags = [
81     "-Dgtk_doc=true"
82     "-Dpam_modules_dir=${placeholder "out"}/lib/security"
83     "-Dsysconfdir=${placeholder "out"}/etc"
84     "-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/system-services"
85     "-Dsystemd_system_unit_dir=${placeholder "out"}/lib/systemd/system"
86   ];
88   PKG_CONFIG_DBUS_1_INTERFACES_DIR = "${placeholder "out"}/share/dbus-1/interfaces";
89   PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
90   PKG_CONFIG_DBUS_1_DATADIR = "${placeholder "out"}/share";
92   # FIXME: Ugly hack for tests to find libpam_wrapper.so
93   LIBRARY_PATH = lib.makeLibraryPath [ python3.pkgs.pypamtest ];
95   doCheck = true;
97   postPatch = ''
98     patchShebangs \
99       po/check-translations.sh \
100       tests/unittest_inspector.py
101   '';
103   meta = with lib; {
104     homepage = "https://fprint.freedesktop.org/";
105     description = "D-Bus daemon that offers libfprint functionality over the D-Bus interprocess communication bus";
106     license = licenses.gpl2Plus;
107     platforms = platforms.linux;
108     maintainers = with maintainers; [ abbradar ];
109   };