[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69380: [PATCH] gnu: guile-irregex: Update to 0.9.11.
From: |
Ludovic Courtès |
Subject: |
bug#69380: [PATCH] gnu: guile-irregex: Update to 0.9.11. |
Date: |
Sat, 02 Mar 2024 17:13:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
Tomas Volf <~@wolfsden.cz> skribis:
> Since upstream now provides tests for guile, they are executed, both before
> install (testing the internals) and after install (making sure the guile
> module and everything works well).
>
> Guile 2.0 for some reason cannot load "foo.scm" using (load-from-path "foo"),
> so symlinks are created to work around that.
>
> * gnu/packages/guile-xyz.scm (guile-irregex)[version]: Update to 0.9.11.
> [arguments]: Convert to gexp.
> <#:phases>{'move-files-around}: Copy files instead of moving.
> {'check, 'check-installed}: New phases.
> (guile2.0-irregex)[arguments]: Add 'create-symlinks phase.
>
> Change-Id: Ib9d4e9c24475aa8e7fc1e70b868b690eaf6ad42e
Applied, thanks!
> + (substitute-keyword-arguments (package-arguments guile-irregex)
> + ((#:phases phases)
> + #~(modify-phases #$phases
> + ;; For some reason guile 2.0 cannot load foo.scm using
> + ;; (load-from-path "foo"). So create symlinks to work around it.
> + (add-before 'check 'create-symlinks
> + (lambda _
> + (use-modules (ice-9 regex))
As a rule of thumb, only write ‘use-modules’ at the top level. Use
#:modules here.
I left it here because it doesn’t matter all that much, and because we
could/should probably remove ‘guile2.0-irregex’ anyway.
> + (for-each
> + (lambda (f)
> + (symlink (regexp-substitute #f (string-match "/([^/]+)$"
> f)
> + 1 ".scm")
> + f))
I would avoid using regexps for such things: it’s heavyweight, hard to
read, and error-prone. Looks like you could do away with just
‘basename’ and the likes, no?
Thanks,
Ludo’.
- bug#69380: [PATCH] gnu: guile-irregex: Update to 0.9.11.,
Ludovic Courtès <=