Subject: [bug#67902] [PATCH 00/95] PHP package chain.

From: Wilko Meyer <[email-masked]>
Date: Sat, 23 Mar 2024 17:36:18 +0100

Hi Nicolas,

I applied v1 of the patchset and the one patch of v2 locally, which
worked pretty well. Patch 01/95 introducing abfngen got rejected, so I
manually applied the changes:

#+begin_src
~/devel/guix [env]$ cat gnu/packages/check.scm.rej 
diff a/gnu/packages/check.scm b/gnu/packages/check.scm	(rejected hunks)
@@ -109,6 +109,30 @@ (define-module (gnu packages check)
   #:use-module (guix deprecation)
   #:use-module (srfi srfi-1))
 
+(define-public abnfgen
+  (package
+    (name "abnfgen")
+    (version "0.21")
+    (source
+     (origin
+       (method url-fetch)
+       (uri "https://www.quut.com/abnfgen/abnfgen-0.21.tar.gz")
+       (sha256
+        (base32 "0vjkbsgr193r0fz0f29sljkw28djwavk51m1izinfjqb07k89xsv"))))
+    (build-system gnu-build-system)
+    (home-page "https://www.quut.com/abnfgen")
+    (synopsis "Generate random documents matching an ABNF grammar.")
+    (description
+     "Given an Augmented Backus-Naur form (ABNF) grammar (RFC 4234),
+this package provides a binary to quickly generate lots of random documents
+that match that grammar. That is useful for
+@itemize
+@item verifying an ABNF grammar's syntactical correctness
+@item illustrating a grammar with non-obvious examples
+@item testing software that is supposed to consume documents described by a grammar
+@end itemize")
+    (license license:expat)))
+
 (define-public pict
   (package
     (name "pict")
#+end_src

However I cannot get phpunit to be build successfully as one dependency
php-doctrine-instantiator seems to be faulty. I'm not too familiar
with guixes composer/php build system, but as far as I can see it fails
while creating the autoload_conf.php:

#+begin_src
error: in phase 'install': uncaught exception:
wrong-type-arg "delete-duplicates" "Wrong type argument in position ~A: ~S" (2 ()) (()) 
Backtrace:
          11 (primitive-load "/gnu/store/2rwq2xc8dcnacns2maqwlkcx85i…")
In guix/build/gnu-build-system.scm:
    908:2 10 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
    634:9  8 (for-each #<procedure 7ffff777eac0 at guix/build/gnu-b…> …)
In ice-9/boot-9.scm:
  1752:10  7 (with-exception-handler _ _ #:unwind? _ # _)
In guix/build/gnu-build-system.scm:
   929:23  6 (_)
In ice-9/ports.scm:
   433:17  5 (call-with-output-file _ _ #:binary _ #:encoding _)
    476:4  4 (_ _)
In guix/build/composer-build-system.scm:
    194:9  3 (_)
In unknown file:
           2 (delete-duplicates (("Doctrine\\Instantiator\\" . "s…")) …)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure delete-duplicates: Wrong type argument in position 2: ()
builder for `/gnu/store/23dv5mprah2xiz2skzf806cybn96zyv1-php-doctrine-instantiator-2.0.0.drv' failed with exit code 1
build of /gnu/store/23dv5mprah2xiz2skzf806cybn96zyv1-php-doctrine-instantiator-2.0.0.drv failed
View build log at '/var/log/guix/drvs/23/dv5mprah2xiz2skzf806cybn96zyv1-php-doctrine-instantiator-2.0.0.drv.gz'.
cannot build derivation `/gnu/store/aflr3m81hpaj4y1m62gnz171z3wnbflj-phpunit-9.6.10.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/aflr3m81hpaj4y1m62gnz171z3wnbflj-phpunit-9.6.10.drv' failed
#+end_src

Maybe I'll find some time to debug this further/figure out what the
compose-build-system is trying there and why exactly it fails so I can
fix it myself; but just in case this wasn't already known I wanted to
document the issue here.

Thanks for the extensive package set and as far as git log tells me for
the composer-build-system as well! :)

-- 
Kind regards,

Wilko Meyer
[email-masked]