push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
{
buildPecl,
lib,
gpgme,
file,
gnupg,
php,
fetchFromGitHub,
}:
let
version = "1.5.4";
in
buildPecl {
inherit version;
pname = "gnupg";
src = fetchFromGitHub {
owner = "php-gnupg";
repo = "php-gnupg";
rev = "gnupg-${version}";
fetchSubmodules = true;
hash = "sha256-g9w0v9qc/Q5qjB9/ekZyheQ1ClIEqMEoBc32nGWhXYA=";
};
buildInputs = [ gpgme ];
nativeCheckInputs = [ gnupg ];
postPhpize = ''
substituteInPlace configure \
--replace-fail '/usr/bin/file' '${file}/bin/file' \
--replace-fail 'SEARCH_PATH="/usr/local /usr /opt /opt/homebrew"' 'SEARCH_PATH="${gpgme.dev}"'
'';
postConfigure = ''
substituteInPlace Makefile \
--replace-fail 'run-tests.php' 'run-tests.php -q --offline'
substituteInPlace tests/gnupg_res_init_file_name.phpt \
--replace-fail '/usr/bin/gpg' '${gnupg}/bin/gpg' \
--replace-fail 'string(12)' 'string(${toString (lib.stringLength "${gnupg}/bin/gpg")})'
substituteInPlace tests/gnupg_oo_init_file_name.phpt \
--replace-fail '/usr/bin/gpg' '${gnupg}/bin/gpg' \
--replace-fail 'string(12)' 'string(${toString (lib.stringLength "${gnupg}/bin/gpg")})'
'';
patches = [
# https://github.com/php-gnupg/php-gnupg/issues/62
./missing-new-line-test.patch
];
doCheck = true;
meta = {
changelog = "https://github.com/php-gnupg/php-gnupg/releases/tag/gnupg-${version}";
broken = lib.versionOlder php.version "8.1"; # Broken on PHP older than 8.1.
description = "PHP wrapper for GpgME library that provides access to GnuPG";
license = lib.licenses.bsd3;
homepage = "https://pecl.php.net/package/gnupg";
maintainers = with lib.maintainers; [ taikx4 ];
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,28 @@
diff --git a/tests/gnupg_oo_sign_clear.phpt b/tests/gnupg_oo_sign_clear.phpt
index 4f9b79c..05fda25 100644
--- a/tests/gnupg_oo_sign_clear.phpt
+++ b/tests/gnupg_oo_sign_clear.phpt
@@ -38,8 +38,7 @@ array(1) {
int(0)
}
}
-string(8) "foo bar
-"
+string(7) "foo bar"
--CLEAN--
<?php
require_once "gnupgt.inc";
diff --git a/tests/gnupg_res_sign_clear.phpt b/tests/gnupg_res_sign_clear.phpt
index 71dd6c2..74fd26d 100644
--- a/tests/gnupg_res_sign_clear.phpt
+++ b/tests/gnupg_res_sign_clear.phpt
@@ -36,8 +36,7 @@ array(1) {
int(0)
}
}
-string(8) "foo bar
-"
+string(7) "foo bar"
--CLEAN--
<?php
require_once "gnupgt.inc";