btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / li / libaribcaption / package.nix
blob936991ef6a875abd9f517b750cb9b29b6f3e1ebb
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
6 , fontconfig
7 , freetype
9 , ApplicationServices
10 , CoreFoundation
11 , CoreGraphics
12 , CoreText
15 stdenv.mkDerivation rec {
16   pname = "libaribcaption";
17   version = "1.1.1";
19   src = fetchFromGitHub {
20     owner = "xqq";
21     repo = "libaribcaption";
22     rev = "v${version}";
23     hash = "sha256-x6l0ZrTktSsqfDLVRXpQtUOruhfc8RF3yT991UVZiKA=";
24   };
26   nativeBuildInputs = [ cmake ];
28   cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
30   buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
31     fontconfig
32     freetype
33   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
34     ApplicationServices
35     CoreFoundation
36     CoreGraphics
37     CoreText
38   ];
40   meta = with lib; {
41     description = "Portable ARIB STD-B24 Caption Decoder/Renderer";
42     homepage = "https://github.com/xqq/libaribcaption";
43     changelog = "https://github.com/xqq/libaribcaption/releases/tag/${src.rev}";
44     license = licenses.mit;
45     maintainers = with maintainers; [ chayleaf ];
46     platforms = platforms.all;
47   };