1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "simdjson";
5 version = "0.9.2";
6
7 src = fetchFromGitHub {
8 owner = "simdjson";
9 repo = "simdjson";
10 rev = "v${version}";
11 sha256 = "sha256-L/a/vTthh7XkiwuvlGk9q+uLEBf8vaPoV1x1fG44zeg=";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 cmakeFlags = [
17 "-DSIMDJSON_JUST_LIBRARY=ON"
18 ] ++ lib.optional stdenv.hostPlatform.isStatic "-DSIMDJSON_BUILD_STATIC=ON";
19
20 meta = with lib; {
21 homepage = "https://simdjson.org/";
22 description = "Parsing gigabytes of JSON per second";
23 license = licenses.asl20;
24 platforms = platforms.all;
25 maintainers = with maintainers; [ chessai ];
26 };
27}