Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 71 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPecl, 5 cargo, 6 rustc, 7 fetchFromGitHub, 8 rustPlatform, 9 curl, 10 pcre2, 11 libiconv, 12 darwin, 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.importCargoLock { 28 lockFile = ./Cargo.lock; 29 outputHashes = { 30 "datadog-profiling-5.0.0" = "sha256-/Z1vGpAHpU5EO80NXnzyAHN4s3iyA1jOquBS8MH1nOo="; 31 }; 32 }; 33 34 env.NIX_CFLAGS_COMPILE = "-O2"; 35 36 nativeBuildInputs = 37 [ 38 cargo 39 rustc 40 ] 41 ++ lib.optionals stdenv.isLinux [ 42 rustPlatform.bindgenHook 43 rustPlatform.cargoSetupHook 44 ] 45 ++ lib.optionals stdenv.isDarwin [ 46 darwin.apple_sdk_11_0.rustPlatform.bindgenHook 47 darwin.apple_sdk_11_0.rustPlatform.cargoSetupHook 48 ]; 49 50 buildInputs = 51 [ 52 curl 53 pcre2 54 ] 55 ++ lib.optionals stdenv.isDarwin [ 56 darwin.apple_sdk.frameworks.CoreFoundation 57 darwin.apple_sdk.frameworks.Security 58 libiconv 59 ]; 60 61 meta = { 62 changelog = "https://github.com/DataDog/dd-trace-php/blob/${src.rev}/CHANGELOG.md"; 63 description = "Datadog Tracing PHP Client"; 64 homepage = "https://github.com/DataDog/dd-trace-php"; 65 license = with lib.licenses; [ 66 asl20 67 bsd3 68 ]; 69 maintainers = lib.teams.php.members; 70 }; 71}