nixpkgs/pkgs/development/libraries/glib-networking/default.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, glib, intltool, gnutls, libproxy
, gsettings-desktop-schemas }:
let
2017-09-18 10:12:30 +01:00
ver_maj = "2.54";
2017-12-03 02:20:51 +00:00
ver_min = "1";
in
stdenv.mkDerivation rec {
name = "glib-networking-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/glib-networking/${ver_maj}/${name}.tar.xz";
2017-12-03 02:20:51 +00:00
sha256 = "0bq16m9nh3gcz9x2fvygr0iwxd2pxcbrm3lj3kihsnh1afv8g9za";
};
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";
2018-02-23 18:36:19 +00:00
LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
preBuild = ''
sed -e "s@${glib.out}/lib/gio/modules@$out/lib/gio/modules@g" -i $(find . -name Makefile)
'';
nativeBuildInputs = [ pkgconfig intltool ];
propagatedBuildInputs = [ glib gnutls libproxy gsettings-desktop-schemas ];
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
doCheck = false; # tests need to access the certificates (among other things)
meta = with stdenv.lib; {
description = "Network-related giomodules for glib";
license = licenses.lgpl2Plus;
platforms = platforms.unix;
};
}