From 0038189df8e1cc4138d88f4108340cd82cfe0d5e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 29 Sep 2019 13:48:21 +0200 Subject: [PATCH] grilo-plugins: add grl-chromaprint --- .../chromaprint-gst-plugins.patch | 13 +++++++++++++ .../libraries/grilo-plugins/default.nix | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch diff --git a/pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch b/pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch new file mode 100644 index 000000000000..cb6a1a354945 --- /dev/null +++ b/pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch @@ -0,0 +1,13 @@ +diff --git a/src/chromaprint/grl-chromaprint.c b/src/chromaprint/grl-chromaprint.c +index 5a3598b..8979291 100644 +--- a/src/chromaprint/grl-chromaprint.c ++++ b/src/chromaprint/grl-chromaprint.c +@@ -111,6 +111,8 @@ + + gst_init (NULL, NULL); + ++ @load_plugins@ ++ + source = grl_chromaprint_source_new (); + grl_registry_register_source (registry, + plugin, diff --git a/pkgs/development/libraries/grilo-plugins/default.nix b/pkgs/development/libraries/grilo-plugins/default.nix index 3f6ab858c239..ddf29c2dcd8c 100644 --- a/pkgs/development/libraries/grilo-plugins/default.nix +++ b/pkgs/development/libraries/grilo-plugins/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchurl +, substituteAll , meson , ninja , pkgconfig @@ -16,6 +17,7 @@ , libgdata , libmediaart , grilo +, gst_all_1 , gnome-online-accounts , gmime , gom @@ -36,6 +38,21 @@ stdenv.mkDerivation rec { sha256 = "0jldaixc4kzycn5v8ixkjld1n0z3dp0l1p3vchgdwpvdvc7kcfw0"; }; + 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 = stdenv.lib.concatMapStrings (plugin: ''gst_registry_scan_path(gst_registry_get(), "${plugin}/lib/gstreamer-1.0");'') (with gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-bad + ]); + }) + ]; + nativeBuildInputs = [ meson ninja @@ -64,6 +81,7 @@ stdenv.mkDerivation rec { libmediaart tracker dleyna-server + gst_all_1.gstreamer ]; passthru = {