@@ -1,4 +1,4 @@
1−{ stdenv, fetchgit, yasm, perl, cmake, pkgconfig, python3Packages }:
1+{ stdenv, fetchgit, yasm, perl, cmake, pkgconfig, python3Packages, writeText }:
22
33stdenv.mkDerivation rec {
44 name = "libaom-${version}";
@@ -13,6 +13,32 @@ stdenv.mkDerivation rec {
1313 buildInputs = [ perl yasm ];
1414 nativeBuildInputs = [ cmake pkgconfig python3Packages.python ];
1515
16+ cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
17+
18+ # * libaom tries to detect what version it is
19+ # * I couldn't get it to grab this from git info,
20+ # (which needs at least leaveDotGit=true)
21+ # * it uses a perl script to parse from CHANGELOG,
22+ # but 1.0.0 doesn't contain an entry for itself :(
23+ # * Upstream patch that adds the entry also nukes all of
24+ # the versions before a project change (open-sourcing?)
25+ # and as a result is 34K which is way too big just to fix this!
26+ # * A stable URL to fetch this from works, but...
27+ # * Upon inspection the resulting CHANGELOG is shorter
28+ # than this comment, so while yes this is a bit gross
29+ # adding these 4 lines here does the job without
30+ # a huge patch in spirit of preferring upstream's fix
31+ # instead of `sed -i 's/v0\.1\.0/v1.0.0/g' aom.pc` or so.
32+ postPatch = let actual_changelog = writeText "CHANGELOG" ''
33+ 2018-06-28 v1.0.0
34+ AOMedia Codec Workgroup Approved version 1.0
35+
36+ 2016-04-07 v0.1.0 "AOMedia Codec 1"
37+ This release is the first Alliance for Open Media codec.
38+ ''; in ''
39+ cp ${actual_changelog} CHANGELOG
40+ '';
41+
1642 meta = with stdenv.lib; {
1743 description = "AV1 Bitstream and Decoding Library";
1844 homepage = https://aomedia.org/av1-features/get-started/;