2023-07-15 17:15:38 +00:00
|
|
|
{ buildPecl, lib, pcre2, fetchFromGitHub, php, fetchpatch }:
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
let
|
|
|
|
version = "5.1.22";
|
|
|
|
in buildPecl {
|
|
|
|
inherit version;
|
2020-10-16 20:44:37 +00:00
|
|
|
pname = "apcu";
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "krakjoe";
|
|
|
|
repo = "apcu";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-L4a+/kWT95a1Km+FzFNiAaBw8enU6k4ZiCFRErjj9o8=";
|
|
|
|
};
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = lib.optionals (lib.versionAtLeast php.version "8.3") [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/krakjoe/apcu/commit/c9a29161c68c0faf71046e8f03f6a90900023ded.patch";
|
|
|
|
hash = "sha256-B0ZKk9TJy2+sYGs7TEX2KxUiOVawIb+RXNgToU1Fz5I=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
buildInputs = [ pcre2 ];
|
2020-10-16 20:44:37 +00:00
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
checkFlagsArray = [ "REPORT_EXIT_STATUS=1" "NO_INTERACTION=1" ];
|
|
|
|
makeFlags = [ "phpincludedir=$(dev)/include" ];
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/krakjoe/apcu/releases/tag/v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Userland cache for PHP";
|
|
|
|
license = licenses.php301;
|
|
|
|
homepage = "https://pecl.php.net/package/APCu";
|
|
|
|
maintainers = teams.php.members;
|
|
|
|
};
|
2020-10-16 20:44:37 +00:00
|
|
|
}
|