@@ -1,4 +1,4 @@
1−{ stdenv, fetchgit, yasm, perl, cmake, pkgconfig, python3Packages }:
1+{ stdenv, fetchgit, yasm, perl, cmake, pkgconfig, python3, writeText }:
22
33stdenv.mkDerivation rec {
44 name = "libaom-${version}";
@@ -10,8 +10,23 @@ stdenv.mkDerivation rec {
1010 sha256 = "07h2vhdiq7c3fqaz44rl4vja3dgryi6n7kwbwbj1rh485ski4j82";
1111 };
1212
13− buildInputs = [ perl yasm ];
14− nativeBuildInputs = [ cmake pkgconfig python3Packages.python ];
13+ nativeBuildInputs = [
14+ yasm perl cmake pkgconfig python3
15+ ];
16+
17+ cmakeFlags = [
18+ "-DBUILD_SHARED_LIBS=ON"
19+ ];
20+
21+ preConfigure = ''
22+ # build uses `git describe` to set the build version
23+ cat > $NIX_BUILD_TOP/git << "EOF"
24+ #!${stdenv.shell}
25+ echo v${version}
26+ EOF
27+ chmod +x $NIX_BUILD_TOP/git
28+ export PATH=$NIX_BUILD_TOP:$PATH
29+ '';
1530
1631 meta = with stdenv.lib; {
1732 description = "AV1 Bitstream and Decoding Library";