about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libshumate
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libshumate')
-rw-r--r--nixpkgs/pkgs/development/libraries/libshumate/default.nix93
1 files changed, 93 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libshumate/default.nix b/nixpkgs/pkgs/development/libraries/libshumate/default.nix
new file mode 100644
index 000000000000..a7a9eda44f2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libshumate/default.nix
@@ -0,0 +1,93 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, gi-docgen
+, meson
+, ninja
+, pkg-config
+, vala
+, gobject-introspection
+, glib
+, cairo
+, sqlite
+, libsoup_3
+, gtk4
+, libsysprof-capture
+, xvfb-run
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libshumate";
+  version = "1.1.2";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc"; # demo app
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "libshumate";
+    rev = version;
+    sha256 = "g/82LQNwM/dwQ/zKDhAGtZE7JEtQ0jFWcylcP1azvSY=";
+  };
+
+  nativeBuildInputs = [
+    gi-docgen
+    meson
+    ninja
+    pkg-config
+    vala
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+    cairo
+    sqlite
+    libsoup_3
+    gtk4
+    libsysprof-capture
+  ];
+
+  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 = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "GTK toolkit providing widgets for embedded maps";
+    homepage = "https://gitlab.gnome.org/GNOME/libshumate";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}