nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at flake-libs 61 lines 1.1 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 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 [ 43 curl 44 pcre2 45 ] 46 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 47 libiconv 48 ]; 49 50 meta = { 51 changelog = "https://github.com/DataDog/dd-trace-php/blob/${src.rev}/CHANGELOG.md"; 52 description = "Datadog Tracing PHP Client"; 53 homepage = "https://github.com/DataDog/dd-trace-php"; 54 license = with lib.licenses; [ 55 asl20 56 bsd3 57 ]; 58 teams = [ lib.teams.php ]; 59 broken = lib.versionAtLeast php.version "8.4"; 60 }; 61}