2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-01-20 10:41:00 +00:00
|
|
|
, fetchpatch
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchurl
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gi-docgen
|
|
|
|
, glib
|
|
|
|
, json-glib
|
2022-07-14 12:49:19 +00:00
|
|
|
, libsoup_3
|
|
|
|
, libxml2
|
2022-03-30 09:31:56 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, gnome
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rest";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "0.9.1";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "kmalwQ7OOD4ZPft/+we1CcwfUVIauNrXavlu0UISwuM=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
patches = [
|
|
|
|
# Pick up MR 30 (https://gitlab.gnome.org/GNOME/librest/-/merge_requests/30) to fix GOA crashes with libsoup 3
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/librest/-/commit/fbad64abe28a96f591a30e3a5d3189c10172a414.patch";
|
|
|
|
hash = "sha256-r8+h84Y/AdM1IOMRcBVwDvfqapqOY8ZtRXdOIQvFR9w=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/librest/-/commit/8049048a0f7d52b3f4101c7123797fed099d4cc8.patch";
|
|
|
|
hash = "sha256-AMhHKzzOoTIlkRwN4KfUwdhxlqvtRgiVjKRfnG7KZwc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
strictDeps = true;
|
|
|
|
depsBuildBuild = [ pkg-config ];
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gi-docgen
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
glib
|
|
|
|
json-glib
|
2022-07-14 12:49:19 +00:00
|
|
|
libsoup_3
|
|
|
|
libxml2
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dexamples=false"
|
|
|
|
|
|
|
|
# Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged.
|
|
|
|
"-Dca_certificates=true"
|
|
|
|
"-Dca_certificates_path=/etc/ssl/certs/ca-certificates.crt"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# https://gitlab.gnome.org/GNOME/librest/-/merge_requests/19
|
|
|
|
substituteInPlace meson.build \
|
|
|
|
--replace "con." "conf."
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
|
|
|
|
# it should be a build-time dep for build
|
|
|
|
# TODO: send upstream
|
|
|
|
substituteInPlace docs/meson.build \
|
|
|
|
--replace "'gi-docgen', ver" "'gi-docgen', native:true, ver"
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
|
|
|
'';
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "librest_1_0";
|
|
|
|
versionPolicy = "odd-unstable";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Helper library for RESTful services";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/librest";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.lgpl21Only;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
};
|
|
|
|
}
|