about summary refs log tree commit diff
path: root/pkgs/development/libraries/libgrss/default.nix
blob: c6de97101be8e916ccd7ef67ca436880f87dae78 (plain) (blame)
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
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, vala, gobject-introspection, gtk-doc
, docbook_xsl, docbook_xml_dtd_412, glib, libxml2, libsoup, gnome, buildPackages
, Foundation, AppKit
}:

stdenv.mkDerivation rec {
  pname = "libgrss";
  version = "0.7.0";

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

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "1nalslgyglvhpva3px06fj6lv5zgfg0qmj0sbxyyl5d963vc02b7";
  };

  patches = [
    (fetchpatch {
      name = "CVE-2016-20011.patch";
      # https://gitlab.gnome.org/GNOME/libgrss/-/merge_requests/7, not yet merged!
      url = "https://gitlab.gnome.org/GNOME/libgrss/-/commit/2c6ea642663e2a44efc8583fae7c54b7b98f72b3.patch";
      sha256 = "1ijvq2jl97vphcvrbrqxvszdmv6yyjfygdca9vyaijpafwyzzb18";
    })
  ];

  nativeBuildInputs = [
    pkg-config
    vala
    gobject-introspection
    gtk-doc
    docbook_xsl
    docbook_xml_dtd_412
  ];

  buildInputs = [
    glib
    libxml2
    libsoup
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    Foundation
    AppKit
  ];

  configureFlags = [
    "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config"
  ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
    "--enable-gtk-doc"
  ];

  doCheck = true;

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
      versionPolicy = "none";
    };
  };

  meta = with lib; {
    description = "Glib abstaction to handle feeds in RSS, Atom and other formats";
    homepage = "https://gitlab.gnome.org/GNOME/libgrss";
    license = licenses.lgpl3Plus;
    maintainers = teams.gnome.members;
    platforms = platforms.unix;
  };
}