diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix index 1767e0f7bf45..2e0e8cbb910e 100644 --- a/pkgs/development/libraries/glib-networking/default.nix +++ b/pkgs/development/libraries/glib-networking/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, glib, intltool, gnutls, libproxy, gnome3 +{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, glib, gettext, gnutls, p11-kit, libproxy, gnome3 , gsettings-desktop-schemas }: let @@ -15,19 +15,23 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs - configureFlags = if stdenv.isDarwin then "--without-ca-certificates" - else "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt"; + patches = [ + # Use GNUTLS system trust for certificates + (fetchpatch { + url = https://git.gnome.org/browse/glib-networking/patch/?id=f1c8feee014007cc913b71357acb609f8d1200df; + sha256 = "1rbxqsrcb5if3xs2d18pqzd9xnjysdj715ijc41n5w326fsawg7i"; + }) + ]; - LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "${placeholder "out"}/lib/gio/modules"; - preBuild = '' - sed -e "s@${glib.out}/lib/gio/modules@$out/lib/gio/modules@g" -i $(find . -name Makefile) + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py ''; - nativeBuildInputs = [ pkgconfig intltool ]; - propagatedBuildInputs = [ glib gnutls libproxy gsettings-desktop-schemas ]; - - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + nativeBuildInputs = [ meson ninja pkgconfig gettext ]; + propagatedBuildInputs = [ glib gnutls p11-kit libproxy gsettings-desktop-schemas ]; doCheck = false; # tests need to access the certificates (among other things)