mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #75435 from Elyhaka/fprintd
This commit is contained in:
commit
0af23b05ab
6 changed files with 134 additions and 71 deletions
|
@ -29,7 +29,6 @@ in
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.fprintd;
|
default = pkgs.fprintd;
|
||||||
defaultText = "pkgs.fprintd";
|
defaultText = "pkgs.fprintd";
|
||||||
example = "pkgs.fprintd-thinkpad";
|
|
||||||
description = ''
|
description = ''
|
||||||
fprintd package to use.
|
fprintd package to use.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,41 +1,31 @@
|
||||||
{ thinkpad ? false
|
{ stdenv
|
||||||
, stdenv
|
, fetchFromGitLab
|
||||||
, fetchFromGitHub
|
|
||||||
, fetchurl
|
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, meson
|
, meson
|
||||||
, ninja
|
, ninja
|
||||||
, libusb1
|
, gusb
|
||||||
, pixman
|
, pixman
|
||||||
, glib
|
, glib
|
||||||
, nss
|
, nss
|
||||||
, gtk3
|
, gobject-introspection
|
||||||
, coreutils
|
, coreutils
|
||||||
, gtk-doc
|
, gtk-doc
|
||||||
, docbook_xsl
|
, docbook_xsl
|
||||||
, docbook_xml_dtd_43
|
, docbook_xml_dtd_43
|
||||||
, openssl ? null
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert thinkpad -> openssl != null;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libfprint" + stdenv.lib.optionalString thinkpad "-thinkpad";
|
pname = "libfprint";
|
||||||
version = "1.0";
|
version = "1.90.1";
|
||||||
|
outputs = [ "out" "devdoc" ];
|
||||||
|
|
||||||
src = {
|
src = fetchFromGitLab {
|
||||||
libfprint-thinkpad =
|
domain = "gitlab.freedesktop.org";
|
||||||
fetchFromGitHub {
|
owner = "libfprint";
|
||||||
owner = "3v1n0";
|
repo = pname;
|
||||||
repo = "libfprint";
|
rev = "v${version}";
|
||||||
rev = "2e2e3821717e9042e93a995bdbd3d00f2df0be9c";
|
sha256 = "0fdaak7qjr9b4482g7fhhqpyfdqpxq5kpmyzkp7f5i7qq2ynb78a";
|
||||||
sha256 = "1vps1wrp7hskf13f7jrv0dwry2fcid76x2w463wplngp63cj7b3b";
|
};
|
||||||
};
|
|
||||||
libfprint = fetchurl {
|
|
||||||
url = "https://gitlab.freedesktop.org/libfprint/libfprint/uploads/aff93e9921d1cff53d7c070944952ff9/libfprint-${version}.tar.xz";
|
|
||||||
sha256 = "0v84pd12v016m8iimhq39fgzamlarqccsr7d98cvrrwrzrgcixrd";
|
|
||||||
};
|
|
||||||
}.${pname};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgconfig
|
pkgconfig
|
||||||
|
@ -44,28 +34,20 @@ stdenv.mkDerivation rec {
|
||||||
gtk-doc
|
gtk-doc
|
||||||
docbook_xsl
|
docbook_xsl
|
||||||
docbook_xml_dtd_43
|
docbook_xml_dtd_43
|
||||||
|
gobject-introspection
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libusb1 # drop in 2.0 for gusb
|
gusb
|
||||||
pixman
|
pixman
|
||||||
glib
|
glib
|
||||||
nss
|
nss
|
||||||
gtk3
|
];
|
||||||
]
|
|
||||||
++ stdenv.lib.optional thinkpad openssl
|
|
||||||
;
|
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dudev_rules_dir=${placeholder "out"}/lib/udev/rules.d"
|
"-Dudev_rules_dir=${placeholder "out"}/lib/udev/rules.d"
|
||||||
"-Dx11-examples=false"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace libfprint/meson.build \
|
|
||||||
--replace /bin/echo ${coreutils}/bin/echo
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://fprint.freedesktop.org/";
|
homepage = "https://fprint.freedesktop.org/";
|
||||||
description = "A library designed to make it easy to add support for consumer fingerprint readers";
|
description = "A library designed to make it easy to add support for consumer fingerprint readers";
|
||||||
|
|
33
pkgs/development/libraries/libpam-wrapper/default.nix
Normal file
33
pkgs/development/libraries/libpam-wrapper/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ stdenv
|
||||||
|
, fetchgit
|
||||||
|
, cmake
|
||||||
|
, linux-pam
|
||||||
|
, enablePython ? false
|
||||||
|
, python ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert enablePython -> python != null;
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "libpam-wrapper";
|
||||||
|
version = "1.1.3";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "git://git.samba.org/pam_wrapper.git";
|
||||||
|
rev = "pam_wrapper-${version}";
|
||||||
|
sha256 = "00mqhsashx7njrvxz085d0b88nizhdy7m3x17ip5yhvwsl63km6p";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional enablePython [ python ];
|
||||||
|
|
||||||
|
# We must use linux-pam, using openpam will result in broken fprintd.
|
||||||
|
buildInputs = [ linux-pam ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Wrapper for testing PAM modules";
|
||||||
|
homepage = "https://cwrap.org/pam_wrapper.html";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = [ maintainers.elyhaka ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,42 +1,70 @@
|
||||||
{ thinkpad ? false
|
{ stdenv
|
||||||
, stdenv
|
, fetchFromGitLab
|
||||||
, fetchurl
|
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, intltool
|
, meson
|
||||||
, libfprint-thinkpad ? null
|
, ninja
|
||||||
, libfprint ? null
|
, perl
|
||||||
|
, gettext
|
||||||
|
, cairo
|
||||||
|
, gtk-doc
|
||||||
|
, libxslt
|
||||||
|
, docbook-xsl-nons
|
||||||
|
, docbook_xml_dtd_412
|
||||||
, glib
|
, glib
|
||||||
|
, dbus
|
||||||
, dbus-glib
|
, dbus-glib
|
||||||
, polkit
|
, polkit
|
||||||
, nss
|
, nss
|
||||||
, pam
|
, pam
|
||||||
, systemd
|
, systemd
|
||||||
, autoreconfHook
|
, libfprint
|
||||||
, gtk-doc
|
, python3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "fprintd" + stdenv.lib.optionalString thinkpad "-thinkpad";
|
pname = "fprintd";
|
||||||
version = "0.9.0";
|
version = "1.90.1";
|
||||||
|
outputs = [ "out" "devdoc" ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitLab {
|
||||||
url = "https://gitlab.freedesktop.org/libfprint/fprintd/uploads/9dec4b63d1f00e637070be1477ce63c0/fprintd-${version}.tar.xz";
|
domain = "gitlab.freedesktop.org";
|
||||||
sha256 = "182gcnwb6zjwmk0dn562rjmpbk7ac7dhipbfdhfic2sn1jzis49p";
|
owner = "libfprint";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
# Fixes issue with ":" when there is multiple paths (might be the case on NixOS)
|
||||||
|
# https://gitlab.freedesktop.org/libfprint/fprintd/-/merge_requests/50
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://gitlab.freedesktop.org/libfprint/fprintd/merge_requests/16.patch";
|
url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/d7fec03f24d10f88d34581c72f0eef201f5eafac.patch";
|
||||||
sha256 = "1y39zsmxjll9hip8464qwhq5qg06c13pnafyafgxdph75lvhdll7";
|
sha256 = "QNN05WF4YZ0XiTwm5NkfqZDuQpyXlnrh+RJF9SNsCDk=";
|
||||||
|
})
|
||||||
|
|
||||||
|
# Fix locating libpam_wrapper for tests
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/merge_requests/40.patch";
|
||||||
|
sha256 = "43uPihK6HhygHw1Qplwci80Wseq/S77VUp+OdEECHmM=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/f401f399a85dbeb2de165b9b9162eb552ab6eea7.patch";
|
||||||
|
sha256 = "Pga+/QEkln8DOwGZfKM1r2urJX4Y3X0bozWWxKZ5ia0=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
intltool
|
|
||||||
pkgconfig
|
pkgconfig
|
||||||
autoreconfHook # Drop with above patch
|
meson
|
||||||
gtk-doc # Drop with above patch
|
ninja
|
||||||
|
perl
|
||||||
|
gettext
|
||||||
|
gtk-doc
|
||||||
|
libxslt
|
||||||
|
dbus
|
||||||
|
docbook-xsl-nons
|
||||||
|
docbook_xml_dtd_412
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -46,23 +74,43 @@ stdenv.mkDerivation rec {
|
||||||
nss
|
nss
|
||||||
pam
|
pam
|
||||||
systemd
|
systemd
|
||||||
]
|
libfprint
|
||||||
++ stdenv.lib.optional thinkpad libfprint-thinkpad
|
|
||||||
++ stdenv.lib.optional (!thinkpad) libfprint
|
|
||||||
;
|
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
# is hardcoded to /var/lib/fprint, this is for the StateDirectory install target
|
|
||||||
"--localstatedir=${placeholder "out"}/var"
|
|
||||||
"--sysconfdir=${placeholder "out"}/etc"
|
|
||||||
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
checkInputs = with python3.pkgs; [
|
||||||
|
python-dbusmock
|
||||||
|
dbus-python
|
||||||
|
pygobject3
|
||||||
|
pycairo
|
||||||
|
pypamtest
|
||||||
|
];
|
||||||
|
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
|
||||||
|
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
|
||||||
|
LIBRARY_PATH = stdenv.lib.makeLibraryPath [ python3.pkgs.pypamtest ];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs po/check-translations.sh
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://fprint.freedesktop.org/";
|
homepage = "https://fprint.freedesktop.org/";
|
||||||
description = "D-Bus daemon that offers libfprint functionality over the D-Bus interprocess communication bus";
|
description = "D-Bus daemon that offers libfprint functionality over the D-Bus interprocess communication bus";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ abbradar ];
|
maintainers = with maintainers; [ abbradar elyhaka ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3530,9 +3530,6 @@ in
|
||||||
fprot = callPackage ../tools/security/fprot { };
|
fprot = callPackage ../tools/security/fprot { };
|
||||||
|
|
||||||
fprintd = callPackage ../tools/security/fprintd { };
|
fprintd = callPackage ../tools/security/fprintd { };
|
||||||
fprintd-thinkpad = fprintd.override {
|
|
||||||
thinkpad = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
franz = callPackage ../applications/networking/instant-messengers/franz { };
|
franz = callPackage ../applications/networking/instant-messengers/franz { };
|
||||||
|
|
||||||
|
@ -12833,9 +12830,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
libfprint = callPackage ../development/libraries/libfprint { };
|
libfprint = callPackage ../development/libraries/libfprint { };
|
||||||
libfprint-thinkpad = libfprint.override {
|
|
||||||
thinkpad = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
libfpx = callPackage ../development/libraries/libfpx { };
|
libfpx = callPackage ../development/libraries/libfpx { };
|
||||||
|
|
||||||
|
@ -13321,6 +13315,8 @@ in
|
||||||
|
|
||||||
libp11 = callPackage ../development/libraries/libp11 { };
|
libp11 = callPackage ../development/libraries/libp11 { };
|
||||||
|
|
||||||
|
libpam-wrapper = callPackage ../development/libraries/libpam-wrapper { };
|
||||||
|
|
||||||
libpar2 = callPackage ../development/libraries/libpar2 { };
|
libpar2 = callPackage ../development/libraries/libpar2 { };
|
||||||
|
|
||||||
libpcap = callPackage ../development/libraries/libpcap { };
|
libpcap = callPackage ../development/libraries/libpcap { };
|
||||||
|
|
|
@ -7040,6 +7040,11 @@ in {
|
||||||
|
|
||||||
pytoml = callPackage ../development/python-modules/pytoml { };
|
pytoml = callPackage ../development/python-modules/pytoml { };
|
||||||
|
|
||||||
|
pypamtest = pkgs.libpam-wrapper.override {
|
||||||
|
enablePython = true;
|
||||||
|
inherit python;
|
||||||
|
};
|
||||||
|
|
||||||
pypandoc = callPackage ../development/python-modules/pypandoc { };
|
pypandoc = callPackage ../development/python-modules/pypandoc { };
|
||||||
|
|
||||||
yamllint = callPackage ../development/python-modules/yamllint { };
|
yamllint = callPackage ../development/python-modules/yamllint { };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue