1 { lib, stdenv, fetchgit, yasm, perl, cmake, pkg-config, python3 }:
3 stdenv.mkDerivation rec {
8 url = "https://aomedia.googlesource.com/aom";
10 sha256 = "178rq1d7i9q4lg40bipkyhdrk18j9wi5k5avpa5bls0zm7g5ifsx";
13 patches = [ ./outputs.patch ];
16 yasm perl cmake pkg-config python3
20 # build uses `git describe` to set the build version
21 cat > $NIX_BUILD_TOP/git << "EOF"
25 chmod +x $NIX_BUILD_TOP/git
26 export PATH=$NIX_BUILD_TOP:$PATH
29 # Configuration options:
30 # https://aomedia.googlesource.com/aom/+/refs/heads/master/build/cmake/aom_config_defaults.cmake
33 "-DBUILD_SHARED_LIBS=ON"
35 ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
36 # CPU detection isn't supported on Darwin and breaks the aarch64-darwin build:
37 "-DCONFIG_RUNTIME_CPU_DETECT=0"
41 moveToOutput lib/libaom.a "$static"
44 outputs = [ "out" "bin" "dev" "static" ];
47 description = "Alliance for Open Media AV1 codec library";
49 Libaom is the reference implementation of the AV1 codec from the Alliance
50 for Open Media. It contains an AV1 library as well as applications like
51 an encoder (aomenc) and a decoder (aomdec).
53 homepage = "https://aomedia.org/av1-features/get-started/";
54 changelog = "https://aomedia.googlesource.com/aom/+/refs/tags/v${version}/CHANGELOG";
55 maintainers = with maintainers; [ primeos kiloreux ];
56 platforms = platforms.all;
57 license = licenses.bsd2;