2021-10-14 00:43:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-05-15 15:35:15 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchpatch2
|
2021-10-14 00:43:12 +00:00
|
|
|
, gi-docgen
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, vala
|
|
|
|
, gobject-introspection
|
2024-05-15 15:35:15 +00:00
|
|
|
, gperf
|
2021-10-14 00:43:12 +00:00
|
|
|
, glib
|
|
|
|
, cairo
|
|
|
|
, sqlite
|
2022-10-21 18:38:19 +00:00
|
|
|
, libsoup_3
|
2021-10-14 00:43:12 +00:00
|
|
|
, gtk4
|
2024-01-02 11:29:13 +00:00
|
|
|
, libsysprof-capture
|
2024-05-15 15:35:15 +00:00
|
|
|
, json-glib
|
|
|
|
, protobufc
|
2021-10-14 00:43:12 +00:00
|
|
|
, xvfb-run
|
2022-02-10 20:34:41 +00:00
|
|
|
, gnome
|
2021-10-14 00:43:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libshumate";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.2.1";
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
outputBin = "devdoc"; # demo app
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
|
|
hash = "sha256-EQXuB34hR/KgOc3fphb6XLlDiIPdlAQn4RaZ3NZUnBE=";
|
2021-10-14 00:43:12 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
# Fix tests https://gitlab.gnome.org/GNOME/libshumate/-/merge_requests/236
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/libshumate/-/commit/852615b0df2252ea67f4f82e9ace2fc2794467b3.patch";
|
|
|
|
hash = "sha256-Ksye3zNNYmzP4O+QFDVODXUkFJOLDVMEZNfGXwbxWhs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
# required to find native gi-docgen when cross compiling
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gi-docgen
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
vala
|
|
|
|
gobject-introspection
|
2024-05-15 15:35:15 +00:00
|
|
|
gperf
|
2021-10-14 00:43:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
cairo
|
|
|
|
sqlite
|
2022-10-21 18:38:19 +00:00
|
|
|
libsoup_3
|
2021-10-14 00:43:12 +00:00
|
|
|
gtk4
|
2024-01-02 11:29:13 +00:00
|
|
|
libsysprof-capture
|
2024-05-15 15:35:15 +00:00
|
|
|
json-glib
|
|
|
|
protobufc
|
2021-10-14 00:43:12 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-14 00:43:12 +00:00
|
|
|
xvfb-run
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Ddemos=true"
|
|
|
|
];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
env \
|
|
|
|
HOME="$TMPDIR" \
|
|
|
|
GTK_A11Y=none \
|
|
|
|
xvfb-run meson test --print-errorlogs
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
2022-02-10 20:34:41 +00:00
|
|
|
moveToOutput share/doc/libshumate-1.0 "$devdoc"
|
2021-10-14 00:43:12 +00:00
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
};
|
2021-10-14 00:43:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "GTK toolkit providing widgets for embedded maps";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "shumate-demo";
|
2021-10-14 00:43:12 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/libshumate";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = teams.gnome.members;
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = platforms.unix;
|
2021-10-14 00:43:12 +00:00
|
|
|
};
|
|
|
|
}
|