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,54 @@
{
buildPecl,
fetchFromGitHub,
fetchpatch,
lib,
php,
runCommand,
systemd,
}:
buildPecl {
pname = "systemd";
version = "0.1.2-unstable-2018-06-11";
src = fetchFromGitHub {
owner = "systemd";
repo = "php-systemd";
rev = "22cf92a6b54ef4c5c13c301fc97d7a7b1615ee62";
hash = "sha256-UhpE9QXChqKLBqutpQ2Y6neo/ULlJGNojf9DCYJfQMU=";
};
patches = [
# Add missing arginfo to suppress the warning
# https://github.com/systemd/php-systemd/issues/9
(fetchpatch {
url = "https://github.com/systemd/php-systemd/commit/0f25ec9aab7747e85445a48213020ea6adda3658.diff";
hash = "sha256-SNRYDRxaeP9LlHxfZOak0OSqZ3AJA+I9Ln0k+yO0DvE=";
})
# Define SD_JOURNAL_SUPPRESS_LOCATION so that the php source code location is used, instead of the C one
# https://github.com/systemd/php-systemd/issues/2
(fetchpatch {
url = "https://github.com/systemd/php-systemd/commit/23575461b8cc55fa9c4132a58393b6438c2aff5c.diff";
hash = "sha256-KBGWdNE7spXpqbeS4c2D5IU3Dz8zGxx4r22FDOA0KzM=";
})
];
buildInputs = [ systemd.dev ];
configureFlags = [ "--with-systemd=${systemd.dev}" ];
# php will exit with a non-zero exit code, if the extension is not loaded
passthru.tests.smokeTest = runCommand "php-systemd-smoke-test" { } ''
echo "<?php sd_journal_send('MESSAGE=Hello world.'); ?>" |
${lib.getExe (php.withExtensions ({ all, ... }: [ all.systemd ]))}
echo ok > $out
'';
meta = {
description = "PHP extension allowing native interaction with systemd and its journal";
homepage = "https://github.com/systemd/php-systemd";
license = lib.licenses.mit;
teams = [ lib.teams.php ];
};
}