Merge pull request #179472 from bootstrap-prime/staging

libfido2: 1.10.0 -> 1.11.0 and refactor to enable NFC support via pcsc
This commit is contained in:
Jan Tojnar 2022-08-05 22:08:02 +02:00 committed by GitHub
commit 29d0b1735f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 17 deletions

View file

@ -5,7 +5,7 @@
, pkg-config
, expat
, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic
, systemd
, systemdMinimal
, audit
, libapparmor
, dbus
@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
libX11
libICE
libSM
]) ++ lib.optional enableSystemd systemd
]) ++ lib.optional enableSystemd systemdMinimal
++ lib.optionals stdenv.isLinux [ audit libapparmor ];
# ToDo: optional selinux?
@ -94,7 +94,7 @@ stdenv.mkDerivation rec {
"--with-systemduserunitdir=${placeholder "out"}/etc/systemd/user"
] ++ lib.optional (!x11Support) "--without-x"
++ lib.optionals stdenv.isLinux [ "--enable-apparmor" "--enable-libaudit" ]
++ lib.optionals enableSystemd [ "SYSTEMCTL=${systemd}/bin/systemctl" ];
++ lib.optionals enableSystemd [ "SYSTEMCTL=${systemdMinimal}/bin/systemctl" ];
NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed";

View file

@ -8,23 +8,24 @@
, openssl
, udev
, zlib
, pcsclite
}:
stdenv.mkDerivation rec {
pname = "libfido2";
version = "1.10.0";
version = "1.11.0";
# releases on https://developers.yubico.com/libfido2/Releases/ are signed
src = fetchurl {
url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
sha256 = "sha256-Um79PVavcGwF0J89IfGO47CxWsDB9cXaGsvCfCcwuZs=";
sha256 = "sha256-CDDFhT47RAmalxZuDOxUpltUt/qqwHBxhy93uOTXswI=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libcbor zlib ]
++ lib.optionals stdenv.isDarwin [ hidapi ]
++ lib.optionals stdenv.isLinux [ udev ];
++ lib.optionals stdenv.isLinux [ udev pcsclite ];
propagatedBuildInputs = [ openssl ];
@ -35,6 +36,7 @@ stdenv.mkDerivation rec {
"-DUSE_HIDAPI=1"
] ++ lib.optionals stdenv.isLinux [
"-DNFC_LINUX=1"
"-DUSE_PCSC=1"
];
meta = with lib; {

View file

@ -22,7 +22,7 @@
, gtk-doc
, coreutils
, useSystemd ? stdenv.isLinux
, systemd
, systemdMinimal
, elogind
# A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault).
# Not yet investigated; it may be due to the "Make netgroup support optional"
@ -106,7 +106,7 @@ stdenv.mkDerivation rec {
duktape
] ++ lib.optionals stdenv.isLinux [
# On Linux, fall back to elogind when systemd support is off.
(if useSystemd then systemd else elogind)
(if useSystemd then systemdMinimal else elogind)
];
propagatedBuildInputs = [

View file

@ -8,9 +8,17 @@
, bluez
, networkmanager
, setuptools-scm
, runCommand
}:
buildPythonPackage rec {
let
# Cannot just add it to path in preCheck since that attribute will be passed to
# mkDerivation even with doCheck = false, causing a dependency cycle.
pbap-client = runCommand "pbap-client" { } ''
mkdir -p "$out/bin"
ln -s "${bluez.test}/test/pbap-client" "$out/bin/pbap-client"
'';
in buildPythonPackage rec {
pname = "python-dbusmock";
version = "0.28.4";
@ -35,7 +43,7 @@ buildPythonPackage rec {
dbus
pygobject3
bluez
(lib.getOutput "test" bluez)
pbap-client
networkmanager
nose
];
@ -63,7 +71,6 @@ buildPythonPackage rec {
# "test_networkmanager"
];
checkPhase = ''
runHook preCheck
nosetests -v

View file

@ -12,7 +12,7 @@
, pkg-config
, python3
, readline
, systemd
, systemdMinimal
, udev
, withExperimental ? false
}: let
@ -48,7 +48,7 @@ in stdenv.mkDerivation rec {
python3.pkgs.wrapPython
];
outputs = [ "out" "dev" ] ++ lib.optional doCheck "test";
outputs = [ "out" "dev" "test" ];
patches = [
# https://github.com/bluez/bluez/commit/0905a06410d4a5189f0be81e25eb3c3e8a2199c5
@ -63,7 +63,7 @@ in stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace tools/hid2hci.rules \
--replace /sbin/udevadm ${systemd}/bin/udevadm \
--replace /sbin/udevadm ${systemdMinimal}/bin/udevadm \
--replace "hid2hci " "$out/lib/udev/hid2hci "
# Disable some tests:
# - test-mesh-crypto depends on the following kernel settings:
@ -107,7 +107,7 @@ in stdenv.mkDerivation rec {
doCheck = stdenv.hostPlatform.isx86_64;
postInstall = lib.optionalString doCheck ''
postInstall = ''
mkdir -p $test/{bin,test}
cp -a test $test
pushd $test/test

View file

@ -8,7 +8,7 @@
, python3
, dbus
, polkit
, systemd
, systemdMinimal
, IOKit
}:
@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook autoconf-archive pkg-config perl ];
buildInputs = [ python3 ]
++ lib.optionals stdenv.isLinux [ dbus polkit systemd ]
++ lib.optionals stdenv.isLinux [ dbus polkit systemdMinimal ]
++ lib.optionals stdenv.isDarwin [ IOKit ];
meta = with lib; {