git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #98307 from mkg20001/libavif

libavif: init at 0.8.1

commit2085a254251d722a739ba90a635b3d02d7dfb58d authorMaciej Krüger <mkg20001@gmail.com> dateSun 11 Oct 2020, 00:04 (6 years ago) parent8ce95de61a1ffb
2 files changed+62
pkgs/development/libraries/libavif/default.nix+60 pkgs/top-level/all-packages.nix+2
pkgs/development/libraries/libavif/default.nixnew file+60
@@ -0,0 +1,60 @@
1+{ stdenv
2+, fetchFromGitHub
3+, libaom
4+, cmake
5+, pkg-config
6+, zlib
7+, libpng
8+, libjpeg
9+, dav1d
10+}:
11+
12+stdenv.mkDerivation rec {
13+ pname = "libavif";
14+ version = "0.8.1";
15+
16+ src = fetchFromGitHub {
17+ owner = "AOMediaCodec";
18+ repo = pname;
19+ rev = "v${version}";
20+ sha256 = "1fs222cn1d60pv5fjsr92axk5dival70b6yqw0wng5ikk9zsdkhy";
21+ };
22+
23+ # reco: encode libaom slowest but best, decode dav1d fastest
24+
25+ cmakeFlags = [
26+ "-DBUILD_SHARED_LIBS=ON"
27+ "-DAVIF_CODEC_AOM=ON"
28+ "-DAVIF_CODEC_DAV1D=ON"
29+ "-DAVIF_BUILD_APPS=ON"
30+ ];
31+
32+ nativeBuildInputs = [
33+ cmake
34+ pkg-config
35+ ];
36+
37+ buildInputs = [
38+ libaom
39+ zlib
40+ libpng
41+ libjpeg
42+ dav1d
43+ ];
44+
45+ meta = with stdenv.lib; {
46+ description = "C implementation of the AV1 Image File Format";
47+ longDescription = ''
48+ Libavif aims to be a friendly, portable C implementation of the
49+ AV1 Image File Format. It is a work-in-progress, but can already
50+ encode and decode all AOM supported YUV formats and bit depths
51+ (with alpha). It also features an encoder and a decoder
52+ (avifenc/avifdec).
53+ '';
54+ homepage = "https://github.com/AOMediaCodec/libavif";
55+ changelog = "https://github.com/AOMediaCodec/libavif/blob/v${version}/CHANGELOG.md";
56+ maintainers = with maintainers; [ mkg20001 ];
57+ platforms = platforms.all;
58+ license = licenses.bsd2;
59+ };
60+}
pkgs/top-level/all-packages.nix+2
@@ -13324,6 +13324,8 @@ in
1332413324
1332513325 libavc1394 = callPackage ../development/libraries/libavc1394 { };
1332613326
13327+ libavif = callPackage ../development/libraries/libavif { };
13328+
1332713329 libb2 = callPackage ../development/libraries/libb2 { };
1332813330
1332913331 libbacktrace = callPackage ../development/libraries/libbacktrace { };