git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #52443 from dtzWill/fix/aom-version-and-shared

libaom: create shared libraries, fix version reported in aom.pc

commit19894adb7703cb5bdacdcdfdac49ea0837814a05 authorWill Dietz <github@wdtz.org> dateFri 28 Dec 2018, 13:04 (8 years ago) parentaebec731720abc
1 file changed+18−3
pkgs/development/libraries/libaom/default.nix+18−3
pkgs/development/libraries/libaom/default.nix+18−3
@@ -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";