9 stdenv.mkDerivation rec {
11 version = "1787"; # Defined in: include/libyuv/version.h
14 url = "https://chromium.googlesource.com/libyuv/libyuv.git";
15 rev = "eb6e7bb63738e29efd82ea3cf2a115238a89fa51"; # refs/heads/stable
16 hash = "sha256-DtRYoaAXb9ZD2OLiKbzKzH5vzuu+Lzu4eHaDgPB9hjU=";
23 # NEON does not work on aarch64, we disable it
24 cmakeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [
25 "-DCMAKE_CXX_FLAGS=-DLIBYUV_DISABLE_NEON"
28 buildInputs = [ libjpeg ];
31 ./link-library-against-libjpeg.patch
35 mkdir -p $out/lib/pkgconfig
36 cp ${./yuv.pc} $out/lib/pkgconfig/libyuv.pc
38 substituteInPlace $out/lib/pkgconfig/libyuv.pc \
39 --replace "@PREFIX@" "$out" \
40 --replace "@VERSION@" "$version"
44 homepage = "https://chromium.googlesource.com/libyuv/libyuv";
45 description = "Open source project that includes YUV scaling and conversion functionality";
46 mainProgram = "yuvconvert";
47 platforms = platforms.unix;
48 maintainers = with maintainers; [ leixb ];
49 license = licenses.bsd3;