Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 28 lines 726 B view raw
1{ lib, stdenv, buildPecl, php, valgrind, pcre2, fetchFromGitHub }: 2 3let 4 version = "5.0.3"; 5in buildPecl { 6 inherit version; 7 pname = "swoole"; 8 9 src = fetchFromGitHub { 10 owner = "swoole"; 11 repo = "swoole-src"; 12 rev = "v${version}"; 13 sha256 = "sha256-xadseYMbA+llzTf9JFIitJK2iR0dN8vAjv3n9/e7FGs="; 14 }; 15 16 buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin) [ valgrind ]; 17 18 doCheck = true; 19 checkTarget = "tests"; 20 21 meta = with lib; { 22 changelog = "https://github.com/swoole/swoole-src/releases/tag/v${version}"; 23 description = "Coroutine-based concurrency library for PHP"; 24 license = licenses.asl20; 25 homepage = "https://www.swoole.co.uk/"; 26 maintainers = teams.php.members; 27 }; 28}