1{ lib, stdenv, buildDunePackage, fetchFromGitHub, dune-configurator, AppKit, Foundation, pkg-config, glib, gst_all_1 }:
2
3buildDunePackage rec {
4 pname = "gstreamer";
5 version = "0.3.1";
6
7 src = fetchFromGitHub {
8 owner = "savonet";
9 repo = "ocaml-gstreamer";
10 rev = "v${version}";
11 sha256 = "0y8xi1q0ld4hrk96bn6jfh9slyjrxmnlhm662ynacp3yzalp8jji";
12 };
13
14 nativeBuildInputs = [ pkg-config ];
15 buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AppKit Foundation ];
16 propagatedBuildInputs = [ glib.dev gst_all_1.gstreamer.dev gst_all_1.gst-plugins-base ];
17
18 CFLAGS_COMPILE = [
19 "-I${glib.dev}/include/glib-2.0"
20 "-I${glib.out}/lib/glib-2.0/include"
21 "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"
22 "-I${gst_all_1.gstreamer.dev}/include/gstreamer-1.0"
23 ];
24
25 meta = with lib; {
26 homepage = "https://github.com/savonet/ocaml-gstreamer";
27 description = "Bindings for the GStreamer library which provides functions for playning and manipulating multimedia streams";
28 license = licenses.lgpl21Only;
29 maintainers = with maintainers; [ dandellion ];
30 };
31}