vapoursynthPlugins.beziercurve: r2 -> r3

This also switches to meson as the build system.
This commit is contained in:
Simon Bruder 2021-01-22 15:11:49 +01:00 committed by Tadeo Kondrak
parent 4f85ede2af
commit 97d1c952c8

View file

@ -1,38 +1,19 @@
{ stdenv, fetchFromGitHub, vapoursynth }: { lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, vapoursynth }:
let stdenv.mkDerivation rec {
ext = stdenv.targetPlatform.extensions.sharedLibrary;
in stdenv.mkDerivation rec {
pname = "vapoursynth-beziercurve"; pname = "vapoursynth-beziercurve";
version = "r2"; version = "r3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kewenyu"; owner = "kewenyu";
repo = "VapourSynth-BezierCurve"; repo = "VapourSynth-BezierCurve";
rev = version; rev = version;
sha256 = "0c96gqa3f2wrm2d22q9qwqq3mk8jir7dl4chxqb2kpcjv4wh3xjg"; sha256 = "1513ndj7sxwihyxx6x9ciyd8jhw9vs6lhzw7fpl7cz7fdj49wwi6";
}; };
nativeBuildInputs = [ meson ninja pkg-config ];
buildInputs = [ vapoursynth ]; buildInputs = [ vapoursynth ];
patchPhase = ''
substituteInPlace VapourSynth-BezierCurve/BezierCurve.h \
--replace '<vapoursynth\' '<vapoursynth/'
'';
buildPhase = ''
c++ -fPIC -shared -I${vapoursynth}/include/vapoursynth \
-o VapourSynth-BezierCurve${ext} \
VapourSynth-BezierCurve/BezierCurve.cpp \
VapourSynth-BezierCurve/CubicBezierCurve.cpp \
VapourSynth-BezierCurve/QuadraticBezierCurve.cpp \
VapourSynth-BezierCurve/VapourSynth-BezierCurve.cpp
'';
installPhase = ''
install -D VapourSynth-BezierCurve${ext} $out/lib/vapoursynth/VapourSynth-BezierCurve${ext}
'';
meta = with lib; { meta = with lib; {
description = "A bézier curve plugin for VapourSynth"; description = "A bézier curve plugin for VapourSynth";
homepage = "https://github.com/kewenyu/VapourSynth-BezierCurve"; homepage = "https://github.com/kewenyu/VapourSynth-BezierCurve";