From 99942ec95830aabe1dd598efcab18ded6c920265 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 15 Oct 2021 18:50:28 +0200 Subject: [PATCH] vapoursynthPlugins.subtext: init at R3 --- default.nix | 1 + plugins/subtext/default.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 plugins/subtext/default.nix diff --git a/default.nix b/default.nix index fe8cbd6..da92337 100644 --- a/default.nix +++ b/default.nix @@ -48,6 +48,7 @@ in retinex = prev.callPackage ./plugins/retinex { }; sangnom = prev.callPackage ./plugins/sangnom { }; scxvid = prev.callPackage ./plugins/scxvid { }; + subtext = prev.callPackage ./plugins/subtext { }; tcanny = prev.callPackage ./plugins/tcanny { }; tnlmeans = prev.callPackage ./plugins/tnlmeans { }; ttempsmooth = prev.callPackage ./plugins/ttempsmooth { }; diff --git a/plugins/subtext/default.nix b/plugins/subtext/default.nix new file mode 100644 index 0000000..7a88104 --- /dev/null +++ b/plugins/subtext/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, ffmpeg, libass, vapoursynth }: + +stdenv.mkDerivation rec { + pname = "subtext"; + version = "R3"; + + src = fetchFromGitHub { + owner = "vapoursynth"; + repo = pname; + rev = version; + sha256 = "sha256-Tux8WFbUn4Bt1EL9r+f+Y/av9w9Y23gc79m1JcZWj50="; + }; + + nativeBuildInputs = [ meson ninja pkg-config ]; + buildInputs = [ ffmpeg libass vapoursynth ]; + + postPatch = '' + substituteInPlace meson.build \ + --replace "vapoursynth_dep.get_pkgconfig_variable('libdir')" "get_option('libdir')" + ''; + + meta = with lib; { + description = "Subtitle plugin for VapourSynth based on libass"; + homepage = "https://github.com/vapoursynth/subtext"; + license = licenses.mit; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}