2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-05-19 13:03:31 +01:00
|
|
|
, fetchFromGitLab
|
2019-10-03 00:47:08 +01:00
|
|
|
, fetchpatch
|
2019-09-18 01:15:57 +01:00
|
|
|
, pkgconfig
|
2020-05-19 13:03:31 +01:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, perl
|
|
|
|
, gettext
|
|
|
|
, cairo
|
|
|
|
, gtk-doc
|
|
|
|
, libxslt
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_412
|
2019-09-18 01:15:57 +01:00
|
|
|
, glib
|
2020-05-19 13:03:31 +01:00
|
|
|
, dbus
|
2019-09-18 01:15:57 +01:00
|
|
|
, dbus-glib
|
|
|
|
, polkit
|
|
|
|
, nss
|
|
|
|
, pam
|
|
|
|
, systemd
|
2020-05-19 13:03:31 +01:00
|
|
|
, libfprint
|
|
|
|
, python3
|
2019-09-18 01:15:57 +01:00
|
|
|
}:
|
2015-01-03 16:46:09 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-19 13:03:31 +01:00
|
|
|
pname = "fprintd";
|
|
|
|
version = "1.90.1";
|
|
|
|
outputs = [ "out" "devdoc" ];
|
2015-01-03 16:46:09 +00:00
|
|
|
|
2020-05-19 13:03:31 +01:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "libfprint";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg";
|
2015-01-03 16:46:09 +00:00
|
|
|
};
|
|
|
|
|
2019-09-16 04:17:54 +01:00
|
|
|
patches = [
|
2020-05-19 13:03:31 +01:00
|
|
|
# Fixes issue with ":" when there is multiple paths (might be the case on NixOS)
|
|
|
|
# https://gitlab.freedesktop.org/libfprint/fprintd/-/merge_requests/50
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/d7fec03f24d10f88d34581c72f0eef201f5eafac.patch";
|
2020-06-02 21:44:52 +01:00
|
|
|
sha256 = "0f88dhizai8jz7hpm5lpki1fx4593zcy89iwi4brsqbqc7jp9ls0";
|
2020-05-19 13:03:31 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
# Fix locating libpam_wrapper for tests
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/merge_requests/40.patch";
|
2020-06-02 21:44:52 +01:00
|
|
|
sha256 = "0qqy090p93lzabavwjxzxaqidkcb3ifacl0d3yh1q7ms2a58yyz3";
|
2020-05-19 13:03:31 +01:00
|
|
|
})
|
2019-09-16 04:17:54 +01:00
|
|
|
(fetchpatch {
|
2020-05-19 13:03:31 +01:00
|
|
|
url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/f401f399a85dbeb2de165b9b9162eb552ab6eea7.patch";
|
2020-06-02 21:44:52 +01:00
|
|
|
sha256 = "1bc9g6kc95imlcdpvp8qgqjsnsxg6nipr6817c1pz5i407yvw1iy";
|
2019-09-16 04:17:54 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-09-18 01:15:57 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
2020-05-19 13:03:31 +01:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
perl
|
|
|
|
gettext
|
|
|
|
gtk-doc
|
|
|
|
libxslt
|
|
|
|
dbus
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_412
|
2019-09-18 01:15:57 +01:00
|
|
|
];
|
2019-05-15 21:56:58 +01:00
|
|
|
|
2019-09-18 01:15:57 +01:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
dbus-glib
|
|
|
|
polkit
|
|
|
|
nss
|
|
|
|
pam
|
|
|
|
systemd
|
2020-05-19 13:03:31 +01:00
|
|
|
libfprint
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
python-dbusmock
|
|
|
|
dbus-python
|
|
|
|
pygobject3
|
|
|
|
pycairo
|
|
|
|
pypamtest
|
|
|
|
];
|
2015-01-03 16:46:09 +00:00
|
|
|
|
2020-05-19 13:03:31 +01: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"
|
2019-05-26 14:03:48 +01:00
|
|
|
];
|
2015-01-03 16:46:09 +00:00
|
|
|
|
2020-05-19 13:03:31 +01: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 09:19:50 +00:00
|
|
|
LIBRARY_PATH = lib.makeLibraryPath [ python3.pkgs.pypamtest ];
|
2020-05-19 13:03:31 +01:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs po/check-translations.sh
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://fprint.freedesktop.org/";
|
2015-01-03 16:46:09 +00:00
|
|
|
description = "D-Bus daemon that offers libfprint functionality over the D-Bus interprocess communication bus";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2020-05-19 13:03:31 +01:00
|
|
|
maintainers = with maintainers; [ abbradar elyhaka ];
|
2015-01-03 16:46:09 +00:00
|
|
|
};
|
|
|
|
}
|