2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, ffmpeg
|
|
|
|
, zlib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ffms";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "2.40";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FFMS";
|
|
|
|
repo = "ffms2";
|
|
|
|
rev = version;
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "sha256-3bPxt911T0bGpAIS2RxBjo+VV84xW06eKcCj3ZAcmvw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-fPIC";
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
mkdir src/config
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
zlib
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# ffms includes a built-in vapoursynth plugin, see:
|
|
|
|
# https://github.com/FFMS/ffms2#avisynth-and-vapoursynth-plugin
|
|
|
|
postInstall = ''
|
|
|
|
mkdir $out/lib/vapoursynth
|
|
|
|
ln -s $out/lib/libffms2.so $out/lib/vapoursynth/libffms2.so
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/FFMS/ffms2/";
|
2021-05-03 20:48:10 +00:00
|
|
|
description = "FFmpeg based source library for easy frame accurate access";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-05-03 20:48:10 +00:00
|
|
|
maintainers = with maintainers; [ tadeokondrak ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|