summaryrefslogtreecommitdiff
path: root/pkgs/by-name/gx/gxml/package.nix
blob: a36a8dcda9e782ff959718c42c97f1121af5f560 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
  stdenv,
  lib,
  fetchFromGitLab,
  gobject-introspection,
  meson,
  ninja,
  pkg-config,
  vala,
  glib,
  libgee,
  libxml2,
  gitUpdater,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "gxml";
  version = "0.20.4";

  outputs = [
    "out"
    "dev"
    "devdoc"
  ];

  src = fetchFromGitLab {
    domain = "gitlab.gnome.org";
    owner = "GNOME";
    repo = "gxml";
    rev = finalAttrs.version;
    hash = "sha256-/gaWuUytBsvAsC95ee6MtTW6g3ltGbkD+JWqrAjJLDc=";
  };

  nativeBuildInputs = [
    gobject-introspection
    meson
    ninja
    pkg-config
    vala
  ];

  propagatedBuildInputs = [
    glib
    libgee
    libxml2
  ];

  postPatch = ''
    # https://gitlab.gnome.org/GNOME/gxml/-/merge_requests/24
    # https://gitlab.gnome.org/GNOME/gxml/-/merge_requests/28
    substituteInPlace gxml/gxml.pc.in \
      --replace-fail "includedir=@prefix@/include" "includedir=${placeholder "dev"}/include" \
      --replace-fail ">=2" ">= 2" \
      --replace-fail ">=0" ">= 0"
  '';

  # https://github.com/NixOS/nixpkgs/issues/407969
  doCheck = false;

  passthru.updateScript = gitUpdater { };

  meta = with lib; {
    description = "Provides a GObject API for manipulating XML and a Serializable framework from GObject to XML";
    homepage = "https://gitlab.gnome.org/GNOME/gxml";
    changelog = "https://gitlab.gnome.org/GNOME/gxml/-/blob/${finalAttrs.version}/NEWS?ref_type=tags";
    license = licenses.lgpl21Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ jmarmstrong1207 ];
    teams = [ teams.gnome ];
  };
})