2022-11-21 17:40:18 +00:00
|
|
|
{ buildPecl, lib, oracle-instantclient, php }:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
let
|
2022-11-21 17:40:18 +00:00
|
|
|
versionData = if (lib.versionOlder php.version "8.1") then {
|
|
|
|
version = "3.0.1";
|
|
|
|
sha256 = "108ds92620dih5768z19hi0jxfa7wfg5hdvyyvpapir87c0ap914";
|
|
|
|
} else {
|
|
|
|
version = "3.2.1";
|
|
|
|
sha256 = "zyF703DzRZDBhlNFFt/dknmZ7layqhgjG1/ZDN+PEsg=";
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
in
|
2020-10-16 20:44:37 +00:00
|
|
|
buildPecl {
|
|
|
|
pname = "oci8";
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
inherit (versionData) version sha256;
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [ oracle-instantclient ];
|
|
|
|
configureFlags = [ "--with-oci8=shared,instantclient,${oracle-instantclient.lib}/lib" ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-03-09 03:18:52 +00:00
|
|
|
sed -i -e 's|OCISDKMANINC=`.*$|OCISDKMANINC="${oracle-instantclient.dev}/include"|' config.m4
|
2020-10-16 20:44:37 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Extension for Oracle Database";
|
|
|
|
license = licenses.php301;
|
|
|
|
homepage = "https://pecl.php.net/package/oci8";
|
|
|
|
maintainers = teams.php.members;
|
|
|
|
};
|
2020-10-16 20:44:37 +00:00
|
|
|
}
|