lomiri.biometryd: 0.3.0 -> 0.3.1

This commit is contained in:
OPNA2608 2024-01-28 19:50:23 +01:00
parent cc6288e436
commit fd30907d55

View File

@ -18,17 +18,18 @@
, qtbase
, qtdeclarative
, sqlite
, validatePkgConfig
}:
stdenv.mkDerivation (finalAttrs: {
pname = "biometryd";
version = "0.3.0";
version = "0.3.1";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/biometryd";
rev = finalAttrs.version;
hash = "sha256-b095rsQnd63Ziqe+rn3ROo4LGXZxZ3Sa6h3apzCuyCs=";
hash = "sha256-derU7pKdNf6pwhskaW7gCLcU9ixBG3U0EI/qtANmmTs=";
};
outputs = [
@ -36,48 +37,10 @@ stdenv.mkDerivation (finalAttrs: {
"dev"
];
patches = [
# https://gitlab.com/ubports/development/core/biometryd/-/merge_requests/31
(fetchpatch {
url = "https://gitlab.com/OPNA2608/biometryd/-/commit/d01d979e4f98c6473761d1ace308aa182017804e.patch";
hash = "sha256-JxL3BLuh33ptfneU1y2qNGFKpeMlZlTMwCK97Rk3aTA=";
})
(fetchpatch {
url = "https://gitlab.com/OPNA2608/biometryd/-/commit/3cec6a3d42ea6aba8892da2c771b317f44daf9e2.patch";
hash = "sha256-Ij/aio38WmZ+NsUSbM195Gwb83goWIcCnJvGwAOJi50=";
})
(fetchpatch {
url = "https://gitlab.com/OPNA2608/biometryd/-/commit/e89bd9444bc1cfe84a9aa93faa23057c80f39564.patch";
hash = "sha256-1vEG349X9+SvY/f3no/l5cMVGpdzC8h/8XOZwL/70Dc=";
})
# https://gitlab.com/ubports/development/core/biometryd/-/merge_requests/32
(fetchpatch {
url = "https://gitlab.com/OPNA2608/biometryd/-/commit/9e52fad0139c5a45f69e6a6256b2b5ff54f77740.patch";
hash = "sha256-DZSdzKq6EYgAllKSDgkGk2g57zHN+gI5fOoj7U5AcKY=";
})
# Fix GCC13 & musl compat
# Remove when version > 0.3.0
(fetchpatch {
url = "https://gitlab.com/ubports/development/core/biometryd/-/commit/bc6f1a743dbb0eda6310bd13229f650be62aa3b3.patch";
hash = "sha256-Pr3zHrMNxTKYHsqHEcVv4fYVknjUwBFRTSuBxZhqUi8=";
})
];
postPatch = ''
# Remove with !31 patches, fetchpatch can't apply renames
pushd data
for type in conf service; do
mv biometryd.$type biometryd.$type.in
substituteInPlace biometryd.$type.in \
--replace '/usr/bin' "\''${CMAKE_INSTALL_FULL_BINDIR}"
done
popd
# Uses pkg_get_variable, cannot substitute prefix with that
substituteInPlace CMakeLists.txt \
--replace 'pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)' 'set(SYSTEMD_SYSTEM_UNIT_DIR "${placeholder "out"}/lib/systemd/system")'
substituteInPlace data/CMakeLists.txt \
--replace 'pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)' 'set(SYSTEMD_SYSTEM_UNIT_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/system")'
substituteInPlace src/biometry/qml/Biometryd/CMakeLists.txt \
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
@ -91,6 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
cmake
pkg-config
qtdeclarative # qmlplugindump
validatePkgConfig
];
buildInputs = [
@ -114,8 +78,9 @@ stdenv.mkDerivation (finalAttrs: {
dontWrapQtApps = true;
cmakeFlags = [
"-DENABLE_WERROR=OFF"
"-DWITH_HYBRIS=OFF"
# maybe-uninitialized warnings
(lib.cmakeBool "ENABLE_WERROR" false)
(lib.cmakeBool "WITH_HYBRIS" false)
];
preBuild = ''
@ -125,6 +90,11 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = with lib; {
description = "Mediates/multiplexes access to biometric devices";
longDescription = ''
@ -133,6 +103,7 @@ stdenv.mkDerivation (finalAttrs: {
them for identification and verification of users.
'';
homepage = "https://gitlab.com/ubports/development/core/biometryd";
changelog = "https://gitlab.com/ubports/development/core/biometryd/-/${finalAttrs.version}/ChangeLog";
license = licenses.lgpl3Only;
maintainers = teams.lomiri.members;
mainProgram = "biometryd";