2020-10-11 12:50:04 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libaom
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, zlib
|
|
|
|
, libpng
|
|
|
|
, libjpeg
|
|
|
|
, dav1d
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libavif";
|
2020-11-03 02:18:15 +00:00
|
|
|
version = "0.8.2";
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AOMediaCodec";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-11-03 02:18:15 +00:00
|
|
|
sha256 = "0f0l8ywz2jhc9mkfrzdxdvr3q39a404yn9wcyvqshfbkbprsan4p";
|
2020-10-11 12:50:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# reco: encode libaom slowest but best, decode dav1d fastest
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
"-DAVIF_CODEC_AOM=ON"
|
|
|
|
"-DAVIF_CODEC_DAV1D=ON"
|
|
|
|
"-DAVIF_BUILD_APPS=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libaom
|
|
|
|
zlib
|
|
|
|
libpng
|
|
|
|
libjpeg
|
|
|
|
dav1d
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "C implementation of the AV1 Image File Format";
|
|
|
|
longDescription = ''
|
|
|
|
Libavif aims to be a friendly, portable C implementation of the
|
|
|
|
AV1 Image File Format. It is a work-in-progress, but can already
|
|
|
|
encode and decode all AOM supported YUV formats and bit depths
|
|
|
|
(with alpha). It also features an encoder and a decoder
|
|
|
|
(avifenc/avifdec).
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/AOMediaCodec/libavif";
|
|
|
|
changelog = "https://github.com/AOMediaCodec/libavif/blob/v${version}/CHANGELOG.md";
|
|
|
|
maintainers = with maintainers; [ mkg20001 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.bsd2;
|
|
|
|
};
|
|
|
|
}
|