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

95 lines
2 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchurl
, substituteAll
, meson
, ninja
2019-09-02 17:06:54 +00:00
, nixosTests
, pkg-config
, glib
, gettext
2019-09-02 17:06:54 +00:00
, makeWrapper
, python3
, gnutls
, p11-kit
, libproxy
, gnome
, gsettings-desktop-schemas
}:
stdenv.mkDerivation rec {
2018-03-03 01:40:53 +00:00
pname = "glib-networking";
2021-03-21 00:32:38 +00:00
version = "2.68.1";
2019-09-02 17:06:54 +00:00
outputs = [ "out" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
2021-03-21 00:32:38 +00:00
sha256 = "0c1vylxly8k7g454g02spi44ybjidlwg461vp713zxd94k8qnpfh";
};
patches = [
(substituteAll {
src = ./hardcode-gsettings.patch;
gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
})
2019-09-02 17:06:54 +00:00
./installed-tests-path.patch
];
2018-03-14 02:46:24 +00:00
postPatch = ''
chmod +x meson_post_install.py # patchShebangs requires executable file
patchShebangs meson_post_install.py
'';
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
2019-09-02 17:06:54 +00:00
makeWrapper
python3 # for install_script
];
buildInputs = [
glib
gnutls
p11-kit
libproxy
gsettings-desktop-schemas
];
doCheck = false; # tests need to access the certificates (among other things)
2019-09-02 17:06:54 +00:00
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];
postFixup = ''
find "$installedTests/libexec" "$out/libexec" -type f -executable -print0 \
| while IFS= read -r -d "" file; do
echo "Wrapping program '$file'"
wrapProgram "$file" --prefix GIO_EXTRA_MODULES : "$out/lib/gio/modules"
done
'';
2018-03-03 01:40:53 +00:00
passthru = {
updateScript = gnome.updateScript {
2018-03-03 01:40:53 +00:00
packageName = pname;
versionPolicy = "odd-unstable";
2018-03-03 01:40:53 +00:00
};
2019-09-02 17:06:54 +00:00
tests = {
2019-11-07 13:11:00 +00:00
installedTests = nixosTests.installed-tests.glib-networking;
2019-09-02 17:06:54 +00:00
};
2018-03-03 01:40:53 +00:00
};
meta = with lib; {
description = "Network-related giomodules for glib";
homepage = "https://gitlab.gnome.org/GNOME/glib-networking";
license = licenses.lgpl21Plus;
maintainers = teams.gnome.members;
platforms = platforms.unix;
};
}