1{ stdenv, fetchurl, glib, libxml2, pkgconfig
2, gnomeSupport ? false, libgnome_keyring, sqlite, glib_networking, gobjectIntrospection
3, libintlOrEmpty
4, intltool, python }:
5let
6 majorVersion = "2.50";
7 version = "${majorVersion}.0";
8in
9stdenv.mkDerivation {
10 name = "libsoup-${version}";
11
12 src = fetchurl {
13 url = "mirror://gnome/sources/libsoup/${majorVersion}/libsoup-${version}.tar.xz";
14 sha256 = "1e01365ac4af3817187ea847f9d3588c27eee01fc519a5a7cb212bb78b0f667b";
15 };
16
17 patchPhase = ''
18 patchShebangs libsoup/
19 '';
20
21 buildInputs = libintlOrEmpty ++ [ intltool python sqlite ];
22 nativeBuildInputs = [ pkgconfig ];
23 propagatedBuildInputs = [ glib libxml2 gobjectIntrospection ]
24 ++ stdenv.lib.optionals gnomeSupport [ libgnome_keyring ];
25 passthru.propagatedUserEnvPackages = [ glib_networking ];
26
27 # glib_networking is a runtime dependency, not a compile-time dependency
28 configureFlags = "--disable-tls-check" + stdenv.lib.optionalString (!gnomeSupport) " --without-gnome";
29
30 NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
31
32 postInstall = "rm -rf $out/share/gtk-doc";
33
34 meta = {
35 inherit (glib.meta) maintainers platforms;
36 };
37}