1 { lib, stdenv, fetchFromGitHub
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
16 assert useVulkan -> withExamples;
18 stdenv.mkDerivation rec {
22 src = fetchFromGitHub {
26 hash = "sha256-RrEim3HXXjx2RUU7K3wPH3QbhNTRN9ZX/oAcyE9aV8I=";
29 outputs = [ "out" "dev" ];
31 nativeBuildInputs = [ meson ninja nasm pkg-config ];
32 # TODO: doxygen (currently only HTML and not build by default).
33 buildInputs = [ xxHash ]
34 ++ lib.optional withExamples SDL2
35 ++ lib.optionals useVulkan [ libplacebo vulkan-loader vulkan-headers ];
38 "-Denable_tools=${lib.boolToString withTools}"
39 "-Denable_examples=${lib.boolToString withExamples}"
54 description = "A cross-platform AV1 decoder focused on speed and correctness";
56 The goal of this project is to provide a decoder for most platforms, and
57 achieve the highest speed possible to overcome the temporary lack of AV1
58 hardware decoder. It supports all features from AV1, including all
59 subsampling and bit-depth parameters.
61 inherit (src.meta) homepage;
62 changelog = "https://code.videolan.org/videolan/dav1d/-/tags/${version}";
63 # More technical: https://code.videolan.org/videolan/dav1d/blob/${version}/NEWS
64 license = licenses.bsd2;
65 platforms = platforms.unix;
66 maintainers = with maintainers; [ primeos ];