2021-10-14 00:43:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, glib
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gnome
|
|
|
|
, libsysprof-capture
|
|
|
|
, sqlite
|
|
|
|
, glib-networking
|
2023-03-15 16:39:30 +00:00
|
|
|
, buildPackages
|
2021-10-14 00:43:12 +00:00
|
|
|
, gobject-introspection
|
2023-03-15 16:39:30 +00:00
|
|
|
, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages
|
2021-10-14 00:43:12 +00:00
|
|
|
, vala
|
|
|
|
, libpsl
|
|
|
|
, python3
|
2022-10-21 18:38:19 +00:00
|
|
|
, gi-docgen
|
2021-10-14 00:43:12 +00:00
|
|
|
, brotli
|
|
|
|
, libnghttp2
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libsoup";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "3.2.2";
|
2021-10-14 00:43:12 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-g2c8aFuRD7fTnx8o7uWvvvtxwFeY/DUKw78biF4e+qE=";
|
2021-10-14 00:43:12 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
glib
|
2021-12-06 16:07:01 +00:00
|
|
|
python3
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
2022-10-21 18:38:19 +00:00
|
|
|
gi-docgen
|
2021-10-14 00:43:12 +00:00
|
|
|
gobject-introspection
|
|
|
|
vala
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
sqlite
|
|
|
|
libpsl
|
|
|
|
glib.out
|
|
|
|
brotli
|
|
|
|
libnghttp2
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
libsysprof-capture
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency
|
|
|
|
"-Dgssapi=disabled"
|
|
|
|
"-Dntlm=disabled"
|
|
|
|
# Requires wstest from autobahn-testsuite.
|
|
|
|
"-Dautobahn=disabled"
|
|
|
|
# Requires gnutls, not added for closure size.
|
|
|
|
"-Dpkcs11_tests=disabled"
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
(lib.mesonEnable "docs" withIntrospection)
|
|
|
|
(lib.mesonEnable "introspection" withIntrospection)
|
|
|
|
(lib.mesonEnable "sysprof" stdenv.isLinux)
|
|
|
|
(lib.mesonEnable "vapi" withIntrospection)
|
2021-10-14 00:43:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# TODO: For some reason the pkg-config setup hook does not pick this up.
|
|
|
|
PKG_CONFIG_PATH = "${libnghttp2.dev}/lib/pkgconfig";
|
|
|
|
|
|
|
|
# HSTS tests fail.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs libsoup/
|
|
|
|
'';
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
|
|
|
'';
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
passthru = {
|
|
|
|
propagatedUserEnvPackages = [
|
|
|
|
glib-networking.out
|
|
|
|
];
|
|
|
|
updateScript = gnome.updateScript {
|
2021-10-17 02:12:59 +00:00
|
|
|
attrPath = "libsoup_3";
|
2021-10-14 00:43:12 +00:00
|
|
|
packageName = pname;
|
|
|
|
versionPolicy = "odd-unstable";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "HTTP client/server library for GNOME";
|
|
|
|
homepage = "https://wiki.gnome.org/Projects/libsoup";
|
|
|
|
license = lib.licenses.lgpl2Plus;
|
|
|
|
inherit (glib.meta) maintainers platforms;
|
|
|
|
};
|
|
|
|
}
|