2022-10-21 18:38:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, substituteAll
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, nixosTests
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, gettext
|
|
|
|
, makeWrapper
|
|
|
|
, gnutls
|
|
|
|
, p11-kit
|
|
|
|
, libproxy
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, gsettings-desktop-schemas
|
2022-11-21 17:40:18 +00:00
|
|
|
, bash
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "glib-networking";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "2.74.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "installedTests" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "HxharvCUEj+OJdj6VWYbP9cQIBY6AXSts1o3aFzaYTs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-gsettings.patch;
|
|
|
|
gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
|
|
|
|
})
|
|
|
|
|
|
|
|
./installed-tests-path.patch
|
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
gettext
|
|
|
|
makeWrapper
|
2022-11-21 17:40:18 +00:00
|
|
|
glib # for gio-querymodules
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gnutls
|
|
|
|
p11-kit
|
|
|
|
libproxy
|
|
|
|
gsettings-desktop-schemas
|
2022-11-21 17:40:18 +00:00
|
|
|
bash # installed-tests shebangs
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false; # tests need to access the certificates (among other things)
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = pname;
|
2021-05-20 23:08:51 +00:00
|
|
|
versionPolicy = "odd-unstable";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
tests = {
|
|
|
|
installedTests = nixosTests.installed-tests.glib-networking;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Network-related giomodules for glib";
|
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/glib-networking";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|