2021-04-27 11:00:17 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, ffmpeg
|
|
|
|
, zlib
|
|
|
|
}:
|
2013-04-10 14:12:02 +01:00
|
|
|
|
2013-12-16 13:32:50 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ffms";
|
2021-04-27 11:00:17 +01:00
|
|
|
version = "2.40";
|
2013-12-16 13:32:50 +00:00
|
|
|
|
2017-03-12 20:24:05 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FFMS";
|
|
|
|
repo = "ffms2";
|
|
|
|
rev = version;
|
2021-04-27 11:00:17 +01:00
|
|
|
sha256 = "sha256-3bPxt911T0bGpAIS2RxBjo+VV84xW06eKcCj3ZAcmvw=";
|
2013-04-10 14:12:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-fPIC";
|
|
|
|
|
2021-04-27 11:00:17 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
mkdir src/config
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
zlib
|
|
|
|
];
|
2013-04-10 14:12:02 +01:00
|
|
|
|
2019-06-26 00:12:38 +01: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-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/FFMS/ffms2/";
|
2021-04-27 11:00:17 +01:00
|
|
|
description = "FFmpeg based source library for easy frame accurate access";
|
2017-03-12 20:24:05 +00:00
|
|
|
license = licenses.mit;
|
2021-04-27 11:00:17 +01:00
|
|
|
maintainers = with maintainers; [ tadeokondrak ];
|
2017-03-12 20:24:05 +00:00
|
|
|
platforms = platforms.unix;
|
2013-04-10 14:12:02 +01:00
|
|
|
};
|
|
|
|
}
|