lol
1{ stdenv, fetchurl, pkgconfig, glib, intltool, gnutls, libproxy, gnome3
2, gsettings-desktop-schemas }:
3
4let
5 pname = "glib-networking";
6 version = "2.54.1";
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 = "0bq16m9nh3gcz9x2fvygr0iwxd2pxcbrm3lj3kihsnh1afv8g9za";
14 };
15
16 outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs
17
18 configureFlags = if stdenv.isDarwin then "--without-ca-certificates"
19 else "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt";
20
21 LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
22
23 preBuild = ''
24 sed -e "s@${glib.out}/lib/gio/modules@$out/lib/gio/modules@g" -i $(find . -name Makefile)
25 '';
26
27 nativeBuildInputs = [ pkgconfig intltool ];
28 propagatedBuildInputs = [ glib gnutls libproxy gsettings-desktop-schemas ];
29
30 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
31
32 doCheck = false; # tests need to access the certificates (among other things)
33
34 passthru = {
35 updateScript = gnome3.updateScript {
36 packageName = pname;
37 };
38 };
39
40 meta = with stdenv.lib; {
41 description = "Network-related giomodules for glib";
42 license = licenses.lgpl2Plus;
43 platforms = platforms.unix;
44 };
45}
46