nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 meson,
6 ninja,
7 pkg-config,
8 vapoursynth,
9 ffmpeg,
10 xxHash,
11 gitUpdater,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 pname = "vapoursynth-bestsource";
16 version = "13";
17
18 outputs = [
19 "out"
20 "dev"
21 ];
22
23 src = fetchFromGitHub {
24 fetchSubmodules = true;
25 owner = "vapoursynth";
26 repo = "bestsource";
27 tag = "R${finalAttrs.version}";
28 hash = "sha256-c+FMFWICDS8Plj6GE2vvhWPmf56Vk10j41HUK1q20/U=";
29 };
30
31 nativeBuildInputs = [
32 meson
33 ninja
34 pkg-config
35 ];
36
37 buildInputs = [
38 vapoursynth
39 (ffmpeg.override { withLcms2 = true; })
40 xxHash
41 ];
42
43 postPatch = ''
44 substituteInPlace meson.build \
45 --replace-fail "vapoursynth_dep.get_variable(pkgconfig: 'libdir')" "get_option('libdir')"
46 '';
47
48 passthru.updateScript = gitUpdater {
49 rev-prefix = "R";
50 ignoredVersions = "*-RC*";
51 };
52
53 meta = {
54 description = "Wrapper library around FFmpeg that ensures sample and frame accurate access to audio and video";
55 homepage = "https://github.com/vapoursynth/bestsource";
56 license = with lib.licenses; [
57 mit
58 wtfpl
59 gpl2Plus
60 ];
61 maintainers = with lib.maintainers; [ snaki ];
62 platforms = lib.platforms.all;
63 };
64})