Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "simdjson"; 5 version = "3.2.3"; 6 7 src = fetchFromGitHub { 8 owner = "simdjson"; 9 repo = "simdjson"; 10 rev = "v${version}"; 11 sha256 = "sha256-h15IyPYvIUPDOJ03KgEDyRhXe0Oi8XCR5LnzSpPc4PI="; 12 }; 13 14 nativeBuildInputs = [ cmake ]; 15 16 cmakeFlags = [ 17 "-DSIMDJSON_DEVELOPER_MODE=OFF" 18 ] ++ lib.optionals stdenv.hostPlatform.isStatic [ 19 "-DBUILD_SHARED_LIBS=OFF" 20 ] ++ lib.optionals (with stdenv.hostPlatform; isPower && isBigEndian) [ 21 # Assume required CPU features are available, since otherwise we 22 # just get a failed build. 23 "-DCMAKE_CXX_FLAGS=-mpower8-vector" 24 ]; 25 26 meta = with lib; { 27 homepage = "https://simdjson.org/"; 28 description = "Parsing gigabytes of JSON per second"; 29 license = licenses.asl20; 30 platforms = platforms.all; 31 maintainers = with maintainers; [ chessai ]; 32 }; 33}