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

47 lines
1.3 KiB
Nix
Raw Normal View History

2018-03-03 01:40:53 +00:00
{ stdenv, fetchurl, pkgconfig, glib, intltool, gnutls, libproxy, gnome3
, gsettings-desktop-schemas }:
let
2018-03-03 01:40:53 +00:00
pname = "glib-networking";
version = "2.54.1";
in
stdenv.mkDerivation rec {
2018-03-03 01:40:53 +00:00
name = "${pname}-${version}";
src = fetchurl {
2018-03-03 01:40:53 +00:00
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${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)
2018-03-03 01:40:53 +00:00
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
};
};
meta = with stdenv.lib; {
description = "Network-related giomodules for glib";
license = licenses.lgpl2Plus;
platforms = platforms.unix;
};
}