nixpkgs/pkgs/development/libraries/simdjson/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
909 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake }:
2020-12-14 00:08:14 +00:00
stdenv.mkDerivation rec {
pname = "simdjson";
2023-08-30 17:23:51 +00:00
version = "3.2.3";
2020-12-14 00:08:14 +00:00
src = fetchFromGitHub {
owner = "simdjson";
repo = "simdjson";
rev = "v${version}";
2023-08-30 17:23:51 +00:00
sha256 = "sha256-h15IyPYvIUPDOJ03KgEDyRhXe0Oi8XCR5LnzSpPc4PI=";
2020-12-14 00:08:14 +00:00
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
2022-07-19 10:57:04 +00:00
"-DSIMDJSON_DEVELOPER_MODE=OFF"
2022-12-28 11:57:07 +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-14 00:08:14 +00:00
meta = with lib; {
2020-12-14 00:08:14 +00:00
homepage = "https://simdjson.org/";
description = "Parsing gigabytes of JSON per second";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ chessai ];
};
}