mirror of
https://codeberg.org/icewind/flakelight-php.git
synced 2026-06-03 09:54:20 +02:00
add krb5 extension
This commit is contained in:
parent
4e1c0fc937
commit
052e3c8dc7
2 changed files with 31 additions and 4 deletions
|
|
@ -41,14 +41,19 @@
|
|||
composerJson;
|
||||
hasPsalm = pathExists config.psalmConfig;
|
||||
hasPhpCsFixer = pathExists config.phpCsFixerConfig;
|
||||
buildPhp = pkgs:
|
||||
(phpVersions.${head composerMeta.phpVersions} pkgs).buildEnv {
|
||||
buildPhpVersion = pkgs: version:
|
||||
(phpVersions.${version} pkgs).buildEnv {
|
||||
extensions = {
|
||||
enabled,
|
||||
all,
|
||||
}:
|
||||
enabled ++ (config.phpExtensions all);
|
||||
}: let
|
||||
extra = {
|
||||
krb5 = pkgs.callPackage ./pkgs/php-krb5.nix {php = phpVersions.${version} pkgs;};
|
||||
};
|
||||
in
|
||||
enabled ++ (config.phpExtensions (all // extra));
|
||||
};
|
||||
buildPhp = pkgs: buildPhpVersion pkgs (head composerMeta.phpVersions);
|
||||
in
|
||||
warnIf (! builtins ? readFileType) "Unsupported Nix version in use."
|
||||
{
|
||||
|
|
@ -79,6 +84,7 @@ in
|
|||
fileFilter
|
||||
(file:
|
||||
file.hasExt "php"
|
||||
|| file.hasExt "stub"
|
||||
|| file.hasExt "phpstub"
|
||||
|| match "snapshot__.*\.snap" file.name != null
|
||||
|| elem file.name [".php-cs-fixer.dist.php" "psalm.xml" "package.json" "package.lock"])
|
||||
|
|
@ -150,6 +156,7 @@ in
|
|||
}
|
||||
// optionalAttrs hasPhpCsFixer {
|
||||
"*.php" = "${getExe php-cs-fixer} fix";
|
||||
"*.stub" = "${getExe php-cs-fixer} fix";
|
||||
"*.phpstub" = "${getExe php-cs-fixer} fix";
|
||||
});
|
||||
}
|
||||
|
|
|
|||
20
pkgs/php-krb5.nix
Normal file
20
pkgs/php-krb5.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
php,
|
||||
lib,
|
||||
krb5,
|
||||
pkg-config,
|
||||
}:
|
||||
php.buildPecl {
|
||||
pname = "krb5";
|
||||
version = "1.2.4";
|
||||
sha256 = "sha256-jasdDGGHP4WxG+U9kI5XLqwSQ5nDg3qjETdM7LXhPJ4=";
|
||||
|
||||
nativeBuildInputs = [pkg-config];
|
||||
buildInputs = [krb5];
|
||||
|
||||
meta = with lib; {
|
||||
description = "PECL krb5 extension";
|
||||
license = licenses.mit;
|
||||
homepage = "https://github.com/php/pecl-authentication-krb5";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue