Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchgit 4, cmake 5, libjpeg 6}: 7 8stdenv.mkDerivation rec { 9 pname = "libyuv"; 10 version = "1787"; # Defined in: include/libyuv/version.h 11 12 src = fetchgit { 13 url = "https://chromium.googlesource.com/libyuv/libyuv.git"; 14 rev = "eb6e7bb63738e29efd82ea3cf2a115238a89fa51"; # refs/heads/stable 15 sha256 = "sha256-DtRYoaAXb9ZD2OLiKbzKzH5vzuu+Lzu4eHaDgPB9hjU="; 16 }; 17 18 nativeBuildInputs = [ 19 cmake 20 ]; 21 22 # NEON does not work on aarch64, we disable it 23 cmakeFlags = lib.optionals stdenv.isAarch64 ["-DCMAKE_CXX_FLAGS=-DLIBYUV_DISABLE_NEON"]; 24 25 buildInputs = [ libjpeg ]; 26 27 patches = [ 28 ./link-library-against-libjpeg.patch 29 ]; 30 31 meta = with lib; { 32 homepage = "https://chromium.googlesource.com/libyuv/libyuv"; 33 description = "Open source project that includes YUV scaling and conversion functionality"; 34 platforms = platforms.unix; 35 maintainers = with maintainers; [ leixb ]; 36 license = licenses.bsd3; 37 }; 38}