depot/third_party/nixpkgs/pkgs/development/libraries/libshumate/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

101 lines
1.8 KiB
Nix

{ lib
, stdenv
, fetchurl
, gi-docgen
, meson
, ninja
, pkg-config
, vala
, gobject-introspection
, gperf
, glib
, cairo
, sqlite
, libsoup_3
, gtk4
, libsysprof-capture
, json-glib
, protobufc
, xvfb-run
, gnome
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libshumate";
version = "1.2.2";
outputs = [ "out" "dev" "devdoc" ];
outputBin = "devdoc"; # demo app
src = fetchurl {
url = "mirror://gnome/sources/libshumate/${lib.versions.majorMinor finalAttrs.version}/libshumate-${finalAttrs.version}.tar.xz";
hash = "sha256-b1h1effy1gs40/RyfrGo0v6snL3AGOU/9fdyqGCPpEs=";
};
depsBuildBuild = [
# required to find native gi-docgen when cross compiling
pkg-config
];
nativeBuildInputs = [
gi-docgen
meson
ninja
pkg-config
vala
gobject-introspection
gperf
];
buildInputs = [
glib
cairo
sqlite
libsoup_3
gtk4
libsysprof-capture
json-glib
protobufc
];
nativeCheckInputs = [
xvfb-run
];
mesonFlags = [
"-Ddemos=true"
];
doCheck = !stdenv.isDarwin;
checkPhase = ''
runHook preCheck
env \
HOME="$TMPDIR" \
GTK_A11Y=none \
xvfb-run meson test --print-errorlogs
runHook postCheck
'';
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput share/doc/libshumate-1.0 "$devdoc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "libshumate";
};
};
meta = with lib; {
description = "GTK toolkit providing widgets for embedded maps";
mainProgram = "shumate-demo";
homepage = "https://gitlab.gnome.org/GNOME/libshumate";
license = licenses.lgpl21Plus;
maintainers = teams.gnome.members;
platforms = platforms.unix;
};
})