2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "simdjson";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "3.6.4";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simdjson";
|
|
|
|
repo = "simdjson";
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
sha256 = "sha256-yIZKlKp4p1HJBAdba+57sGl0ri0gGtjSgZQ16/vDE34=";
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-08-12 12:06:08 +00:00
|
|
|
"-DSIMDJSON_DEVELOPER_MODE=OFF"
|
2022-12-28 21:21:41 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isStatic [
|
|
|
|
"-DBUILD_SHARED_LIBS=OFF"
|
|
|
|
] ++ lib.optionals (with stdenv.hostPlatform; isPower && isBigEndian) [
|
|
|
|
# Assume required CPU features are available, since otherwise we
|
|
|
|
# just get a failed build.
|
|
|
|
"-DCMAKE_CXX_FLAGS=-mpower8-vector"
|
|
|
|
];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-25 13:55:36 +00:00
|
|
|
homepage = "https://simdjson.org/";
|
|
|
|
description = "Parsing gigabytes of JSON per second";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ chessai ];
|
|
|
|
};
|
|
|
|
}
|