diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/libraries/libavif | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/libraries/libavif')
-rw-r--r-- | pkgs/development/libraries/libavif/default.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libavif/default.nix b/pkgs/development/libraries/libavif/default.nix new file mode 100644 index 00000000000..81f07703c94 --- /dev/null +++ b/pkgs/development/libraries/libavif/default.nix @@ -0,0 +1,61 @@ +{ lib, stdenv +, fetchFromGitHub +, libaom +, cmake +, pkg-config +, zlib +, libpng +, libjpeg +, dav1d +}: + +stdenv.mkDerivation rec { + pname = "libavif"; + version = "0.9.2"; + + src = fetchFromGitHub { + owner = "AOMediaCodec"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-0/5JLynYzr7ZewBbrNoxr26UkVzpSP9RqlmH2ql8tfs="; + }; + + # reco: encode libaom slowest but best, decode dav1d fastest + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DAVIF_CODEC_AOM=ON" # best encoder (slow but small) + "-DAVIF_CODEC_DAV1D=ON" # best decoder (fast) + "-DAVIF_CODEC_AOM_DECODE=OFF" + "-DAVIF_BUILD_APPS=ON" + ]; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + libaom + zlib + libpng + libjpeg + dav1d + ]; + + meta = with 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; + }; +} |