Subject: [PATCH v4 78/98] gnu: Add php-symfony-polyfill-intl-idn.

From: Nicolas Graves <[email-masked]>
Date: Mon, 7 Oct 2024 23:44:46 +0200

* gnu/packages/php-xyz.scm (php-symfony-polyfill-intl-idn): New variable.

Change-Id: Icca9053843d2297a08f992eb463598dd86326fbc
---
 gnu/packages/php-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm
index d41ad20ec4..7ee76d2762 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -2111,3 +2111,35 @@ (define-public php-symfony-polyfill-intl-grapheme
     (home-page "https://symfony.com")
     (license license:expat)))
 
+(define-public php-symfony-polyfill-intl-idn
+  (package
+    (name "php-symfony-polyfill-intl-idn")
+    (version "1.28.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/symfony/polyfill-intl-idn")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00mp7cn68r8sdbwcjjjp3bgch9zjpkv9b80srawsmq77spwpd0sh"))))
+    (build-system composer-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'remove-polyfill-php72-dependency
+                    (lambda _
+                      (substitute* "composer.json"
+                        ((".*symfony/polyfill-intl-normalizer.*," all)
+                         (string-drop-right all 1))
+                        ((".*symfony/polyfill-php72.*")
+                         "")))))))
+    (inputs
+     (list php-symfony-polyfill-intl-normalizer))
+    (synopsis "Intl's iden_ functions for older PHP")
+    (description
+     "This package provides Symfony polyfill for intl's idn_to_ascii and
+idn_to_utf8 functions.")
+    (home-page "https://symfony.com")
+    (license license:expat)))
+
-- 
2.46.0