1{ 2 lib, 3 stdenv, 4 buildPecl, 5 cargo, 6 rustc, 7 fetchFromGitHub, 8 rustPlatform, 9 curl, 10 pcre2, 11 libiconv, 12 php, 13}: 14 15buildPecl rec { 16 pname = "ddtrace"; 17 version = "0.97.0"; 18 19 src = fetchFromGitHub { 20 owner = "DataDog"; 21 repo = "dd-trace-php"; 22 rev = version; 23 fetchSubmodules = true; 24 hash = "sha256-Kx2HaWvRT+mFIs0LAAptx6nm9DQ83QEuyHNcEPEr7A4="; 25 }; 26 27 cargoDeps = rustPlatform.fetchCargoVendor { 28 inherit src; 29 hash = "sha256-cwhE6M8r8QnrIiNgEekI25GcKTByySrZsigPd9/Fq7o="; 30 }; 31 32 env.NIX_CFLAGS_COMPILE = "-O2"; 33 34 nativeBuildInputs = [ 35 cargo 36 rustc 37 rustPlatform.bindgenHook 38 rustPlatform.cargoSetupHook 39 ]; 40 41 buildInputs = [ 42 curl 43 pcre2 44 ] 45 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 46 libiconv 47 ]; 48 49 meta = { 50 changelog = "https://github.com/DataDog/dd-trace-php/blob/${src.rev}/CHANGELOG.md"; 51 description = "Datadog Tracing PHP Client"; 52 homepage = "https://github.com/DataDog/dd-trace-php"; 53 license = with lib.licenses; [ 54 asl20 55 bsd3 56 ]; 57 teams = [ lib.teams.php ]; 58 broken = lib.versionAtLeast php.version "8.4"; 59 }; 60}