Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, autoreconfHook 5, pkg-config 6, ffmpeg_4 7, zlib 8}: 9 10stdenv.mkDerivation rec { 11 pname = "ffms"; 12 version = "2.40"; 13 14 src = fetchFromGitHub { 15 owner = "FFMS"; 16 repo = "ffms2"; 17 rev = version; 18 sha256 = "sha256-3bPxt911T0bGpAIS2RxBjo+VV84xW06eKcCj3ZAcmvw="; 19 }; 20 21 env.NIX_CFLAGS_COMPILE = "-fPIC"; 22 23 nativeBuildInputs = [ 24 autoreconfHook 25 pkg-config 26 ]; 27 28 preAutoreconf = '' 29 mkdir src/config 30 ''; 31 32 buildInputs = [ 33 ffmpeg_4 34 zlib 35 ]; 36 37 # ffms includes a built-in vapoursynth plugin, see: 38 # https://github.com/FFMS/ffms2#avisynth-and-vapoursynth-plugin 39 postInstall = '' 40 mkdir $out/lib/vapoursynth 41 ln -s $out/lib/libffms2.so $out/lib/vapoursynth/libffms2.so 42 ''; 43 44 meta = with lib; { 45 homepage = "https://github.com/FFMS/ffms2/"; 46 description = "FFmpeg based source library for easy frame accurate access"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ tadeokondrak ]; 49 platforms = platforms.unix; 50 }; 51}