15 stdenv.mkDerivation rec {
19 # releases on https://developers.yubico.com/libfido2/Releases/ are signed
21 url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
22 hash = "sha256-q6qxMY0h0mLs5Bb7inEy+pN0vaifb6UrhqmKL1cSth4=";
25 nativeBuildInputs = [ cmake pkg-config ];
27 buildInputs = [ libcbor zlib ]
28 ++ lib.optionals stdenv.hostPlatform.isDarwin [ hidapi ]
29 ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ]
30 ++ lib.optionals (stdenv.hostPlatform.isLinux && withPcsclite) [ pcsclite ];
32 propagatedBuildInputs = [ openssl ];
34 outputs = [ "out" "dev" "man" ];
37 "-DUDEV_RULES_DIR=${placeholder "out"}/etc/udev/rules.d"
38 "-DCMAKE_INSTALL_LIBDIR=lib"
39 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
41 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
43 ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withPcsclite) [
47 # causes possible redefinition of _FORTIFY_SOURCE?
48 hardeningDisable = [ "fortify3" ];
52 Provides library functionality for FIDO 2.0, including communication with a device over USB.
54 homepage = "https://github.com/Yubico/libfido2";
55 license = licenses.bsd2;
56 maintainers = with maintainers; [ prusnak ];
57 platforms = platforms.unix;