From 7b44695658bcfd3f077585df622ee41c6a19ab17 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Thu, 11 Mar 2021 18:01:45 +0100 Subject: [PATCH] php.extensions.swoole: init at 4.6.4 --- .../php-packages/swoole/default.nix | 21 +++++++++++++++++++ pkgs/top-level/php-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/php-packages/swoole/default.nix diff --git a/pkgs/development/php-packages/swoole/default.nix b/pkgs/development/php-packages/swoole/default.nix new file mode 100644 index 000000000000..b3d43acd1b32 --- /dev/null +++ b/pkgs/development/php-packages/swoole/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPecl, php, valgrind, pcre' }: + +buildPecl { + pname = "swoole"; + + version = "4.6.4"; + sha256 = "0hgndnn27q7fbsb0nw6bfdg0kyy5di9vrmf7g53jc6lsnf73ha31"; + + buildInputs = [ valgrind pcre' ]; + internalDeps = lib.optionals (lib.versionOlder php.version "7.4") [ php.extensions.hash ]; + + doCheck = true; + checkTarget = "tests"; + + meta = with lib; { + description = "Coroutine-based concurrency library for PHP"; + license = licenses.asl20; + homepage = "https://www.swoole.co.uk/"; + maintainers = teams.php.members; + }; +} diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 96d3e9b423b3..d548be9ac2d5 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -138,6 +138,8 @@ lib.makeScope pkgs.newScope (self: with self; { sqlsrv = callPackage ../development/php-packages/sqlsrv { }; + swoole = callPackage ../development/php-packages/swoole { }; + v8 = buildPecl { version = "0.2.2"; pname = "v8";