1{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, glib, gettext, gnutls, p11-kit, libproxy, gnome3
2, gsettings-desktop-schemas }:
3
4let
5 pname = "glib-networking";
6 version = "2.56.0";
7in
8stdenv.mkDerivation rec {
9 name = "${pname}-${version}";
10
11 src = fetchurl {
12 url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
13 sha256 = "14vw8xwajd7m31bpavg2psk693plhjikwpk8bzf3jl1fmsy11za7";
14 };
15
16 outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs
17
18 patches = [
19 # Use GNUTLS system trust for certificates
20 (fetchpatch {
21 url = https://gitlab.gnome.org/GNOME/glib-networking/commit/f1c8feee014007cc913b71357acb609f8d1200df.patch;
22 sha256 = "1rbxqsrcb5if3xs2d18pqzd9xnjysdj715ijc41n5w326fsawg7i";
23 })
24 ];
25
26 PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "${placeholder "out"}/lib/gio/modules";
27
28 postPatch = ''
29 chmod +x meson_post_install.py # patchShebangs requires executable file
30 patchShebangs meson_post_install.py
31 '';
32
33 nativeBuildInputs = [ meson ninja pkgconfig gettext ];
34 propagatedBuildInputs = [ glib gnutls p11-kit libproxy gsettings-desktop-schemas ];
35
36 doCheck = false; # tests need to access the certificates (among other things)
37
38 passthru = {
39 updateScript = gnome3.updateScript {
40 packageName = pname;
41 };
42 };
43
44 meta = with stdenv.lib; {
45 description = "Network-related giomodules for glib";
46 license = licenses.lgpl2Plus;
47 platforms = platforms.unix;
48 };
49}