about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/gstreamer/default.nix
blob: 34407299914a5b055cdc55b9131f15cf63f2a169 (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
{ lib, stdenv, buildDunePackage, fetchFromGitHub, dune-configurator, AppKit, Foundation, pkg-config, glib, gst_all_1 }:

buildDunePackage rec {
  pname = "gstreamer";
  version = "0.3.1";

  src = fetchFromGitHub {
    owner = "savonet";
    repo = "ocaml-gstreamer";
    rev = "v${version}";
    sha256 = "0y8xi1q0ld4hrk96bn6jfh9slyjrxmnlhm662ynacp3yzalp8jji";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AppKit Foundation ];
  propagatedBuildInputs = [ glib.dev gst_all_1.gstreamer.dev gst_all_1.gst-plugins-base ];

  CFLAGS_COMPILE = [
    "-I${glib.dev}/include/glib-2.0"
    "-I${glib.out}/lib/glib-2.0/include"
    "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"
    "-I${gst_all_1.gstreamer.dev}/include/gstreamer-1.0"
  ];

  meta = with lib; {
    homepage = "https://github.com/savonet/ocaml-gstreamer";
    description = "Bindings for the GStreamer library which provides functions for playning and manipulating multimedia streams";
    license = licenses.lgpl21Only;
    maintainers = with maintainers; [ dandellion ];
  };
}