diff options
author | Martin Becze <mjbecze@riseup.net> | 2020-09-04 15:25:14 -0500 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-09-07 08:49:04 +0200 |
commit | 45231d17580bd1f6bc9c5d7b84e79c7f4cdc7b93 (patch) | |
tree | 28262436013c8c4fd1e464a82d415cf81912ce9b /gnu | |
parent | 30d59b310df22b87bad64b1c9a0c5ff39b92e3b3 (diff) | |
download | guix-45231d17580bd1f6bc9c5d7b84e79c7f4cdc7b93.tar.gz guix-45231d17580bd1f6bc9c5d7b84e79c7f4cdc7b93.zip |
gnu: guile-pfds: When using Guile 3, compile as a r6rs library.
This allow the package to be resused by r6rs compliant scheme implementations
that expect *.sls files.
* gnu/packages/guile-xyz.scm (guile2.2-pfds): Rename *.sls files to *.scm
since Guile 2 does not support the sls extension.
(guile-pfds): Removed the renaming of files to *.sls to *.scm.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/guile-xyz.scm | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index de2aed1096..f88ebf2abf 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -798,6 +798,7 @@ using Guile's foreign function interface.") (build-system guile-build-system) (arguments '(#:source-directory "src" + #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch") #:phases (modify-phases %standard-phases (add-after 'unpack 'move-files-around (lambda _ @@ -806,8 +807,7 @@ using Guile's foreign function interface.") (mkdir-p "src/pfds") (for-each (lambda (file) (rename-file file - (string-append "src/pfds/" - file))) + (string-append "src/pfds/" file))) '("bbtrees.sls" "deques" "deques.sls" @@ -821,15 +821,6 @@ using Guile's foreign function interface.") "queues.sls" "sequences.sls" "sets.sls")) - - ;; In Guile <= 2.2.4, there's no way to tell 'guild - ;; compile' to accept the ".sls" extension. So... - (for-each (lambda (file) - (rename-file file - (string-append - (string-drop-right file 4) - ".scm"))) - (find-files "." "\\.sls$")) #t))))) (native-inputs `(("guile" ,guile-3.0))) @@ -892,7 +883,18 @@ types are supported.") (substitute-keyword-arguments (package-arguments guile-pfds) ((#:phases phases) `(modify-phases ,phases - (delete 'work-around-guile-bug))))))) + (delete 'work-around-guile-bug) + (add-after 'move-files-around 'sls->scm + (lambda _ + ;; In Guile <= 2.2.4, there's no way to tell 'guild + ;; compile' to accept the ".sls" extension. So... + (for-each (lambda (file) + (rename-file file + (string-append + (string-drop-right file 4) + ".scm"))) + (find-files "." "\\.sls$")) + #t)))))))) (define-public guile3.0-pfds (deprecated-package "guile3.0-pfds" guile-pfds)) |