diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix index 828a00ecda64..39e17a894cb7 100644 --- a/pkgs/development/libraries/glib-networking/default.nix +++ b/pkgs/development/libraries/glib-networking/default.nix @@ -35,6 +35,12 @@ stdenv.mkDerivation rec { }) ./installed-tests-path.patch + + # pkcs11 tests provide a relative path that gnutls of course isn't able to + # load, resulting in test failures + # https://gitlab.gnome.org/GNOME/glib-networking/-/blob/2.78.1/tls/tests/certificate.c#L926 + # https://gitlab.gnome.org/GNOME/glib-networking/-/blob/2.78.1/tls/tests/connection.c#L3380 + ./disable-pkcs11-tests.patch ]; strictDeps = true; diff --git a/pkgs/development/libraries/glib-networking/disable-pkcs11-tests.patch b/pkgs/development/libraries/glib-networking/disable-pkcs11-tests.patch new file mode 100644 index 000000000000..43a37878b56c --- /dev/null +++ b/pkgs/development/libraries/glib-networking/disable-pkcs11-tests.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index 0b3b8c0..7f6ce09 100644 +--- a/meson.build ++++ b/meson.build +@@ -86,7 +86,7 @@ if gnutls_dep.found() + backends += ['gnutls'] + # test-specific, maybe move to tls/tests + if cc.has_function('gnutls_pkcs11_init', prefix: '#include ', dependencies: gnutls_dep) +- config_h.set10('HAVE_GNUTLS_PKCS11', true) ++ config_h.set10('HAVE_GNUTLS_PKCS11', false) + endif + endif +