about summary refs log tree commit diff
path: root/pkgs/development/libraries/grilo-plugins/default.nix
blob: 88b83a32918f91e66943ea92c57cb128b7701f10 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{ lib, stdenv
, fetchurl
, substituteAll
, meson
, ninja
, pkg-config
, gettext
, gperf
, sqlite
, libarchive
, libdmapsharing
, libsoup_3
, gnome
, libxml2
, lua5_4
, liboauth
, libgdata
, libmediaart
, grilo
, gst_all_1
, gnome-online-accounts
, gmime
, gom
, json-glib
, avahi
, tracker
, dleyna-server
, itstool
, totem-pl-parser
}:

stdenv.mkDerivation rec {
  pname = "grilo-plugins";
  version = "0.3.16";

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

  patches = [
    # grl-chromaprint requires the following GStreamer elements:
    # * fakesink (gstreamer)
    # * playbin (gst-plugins-base)
    # * chromaprint (gst-plugins-bad)
    (substituteAll {
      src = ./chromaprint-gst-plugins.patch;
      load_plugins = lib.concatMapStrings (plugin: ''gst_registry_scan_path(gst_registry_get(), "${lib.getLib plugin}/lib/gstreamer-1.0");'') (with gst_all_1; [
        gstreamer
        gst-plugins-base
        gst-plugins-bad
      ]);
    })
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    gettext
    itstool
    gperf # for lua-factory
  ];

  buildInputs = [
    grilo
    libxml2
    # libgdata
    lua5_4
    liboauth
    sqlite
    gnome-online-accounts
    totem-pl-parser
    libarchive
    libdmapsharing
    libsoup_3
    gmime
    gom
    json-glib
    avahi
    libmediaart
    tracker
    dleyna-server
    gst_all_1.gstreamer
  ];

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

  meta = with lib; {
    homepage = "https://wiki.gnome.org/Projects/Grilo";
    description = "A collection of plugins for the Grilo framework";
    maintainers = teams.gnome.members;
    license = licenses.lgpl21Plus;
    platforms = platforms.unix;
  };
}