2021-06-28 23:13:55 +00:00
|
|
|
{ lib, buildPecl, fetchFromGitHub, writeText, libcouchbase, zlib, php, substituteAll }:
|
2020-10-16 20:44:37 +00:00
|
|
|
let
|
|
|
|
pname = "couchbase";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "3.1.2";
|
2020-10-16 20:44:37 +00:00
|
|
|
in
|
|
|
|
buildPecl {
|
|
|
|
inherit pname version;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-10-16 20:44:37 +00:00
|
|
|
owner = "couchbase";
|
|
|
|
repo = "php-couchbase";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "0zm2jm5lzjjqlhkiivm4v5gr4286pwqaf5nar1ga816hhwnyhj42";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [ "--with-couchbase" ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [ libcouchbase zlib ];
|
2021-04-17 00:35:05 +00:00
|
|
|
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
patches = [
|
2021-06-28 23:13:55 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./libcouchbase.patch;
|
|
|
|
inherit libcouchbase;
|
|
|
|
})
|
2020-10-16 20:44:37 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Couchbase Server PHP extension";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://docs.couchbase.com/php-sdk/current/project-docs/sdk-release-notes.html";
|
|
|
|
maintainers = teams.php.members;
|
|
|
|
};
|
2020-10-16 20:44:37 +00:00
|
|
|
}
|