1 { lib, stdenv, fetchFromGitLab
2 , meson, ninja, nasm, pkg-config
4 , withTools ? false # "dav1d" binary
5 , withExamples ? false, SDL2 # "dav1dplay" binary
6 , useVulkan ? false, libplacebo, vulkan-loader, vulkan-headers
9 assert useVulkan -> withExamples;
11 stdenv.mkDerivation rec {
15 src = fetchFromGitLab {
16 domain = "code.videolan.org";
20 sha256 = "sha256-RVr7NFVxY+6MBD8NV7eMW8TEWuCgcfqpula1o1VZe0o=";
23 nativeBuildInputs = [ meson ninja nasm pkg-config ];
24 # TODO: doxygen (currently only HTML and not build by default).
25 buildInputs = [ xxHash ]
26 ++ lib.optional withExamples SDL2
27 ++ lib.optionals useVulkan [ libplacebo vulkan-loader vulkan-headers ];
30 "-Denable_tools=${lib.boolToString withTools}"
31 "-Denable_examples=${lib.boolToString withExamples}"
37 description = "A cross-platform AV1 decoder focused on speed and correctness";
39 The goal of this project is to provide a decoder for most platforms, and
40 achieve the highest speed possible to overcome the temporary lack of AV1
41 hardware decoder. It supports all features from AV1, including all
42 subsampling and bit-depth parameters.
44 inherit (src.meta) homepage;
45 changelog = "https://code.videolan.org/videolan/dav1d/-/tags/${version}";
46 # More technical: https://code.videolan.org/videolan/dav1d/blob/${version}/NEWS
47 license = licenses.bsd2;
48 platforms = platforms.unix;
49 maintainers = with maintainers; [ primeos ];