Hello, Currently ‘haunt build’ doesn't resolves symlinks in the ‘static-directory’.
The following files layout was generated by ‘guix environment --no-grafts --pure --root=guix-root-static --load=guix.scm’ --8<---------------cut here---------------start------------->8--- tree -L 1 guix-root-static/share/static/ guix-root-static/share/static/ ├── css -> /gnu/store/…-twbs-3.3.5-dist/share/static/css └── js 2 directories, 0 files --8<---------------cut here---------------end--------------->8--- ‘guix-root-static/share/static/js’ is a directory and it will be copied by --8<---------------cut here---------------start------------->8--- (site #:builders (list (static-directory "guix-root-static/share/static" "static")) …) --8<---------------cut here---------------end--------------->8--- but ‘guix-root-static/share/static/css’ is a symlink. It will be copied as an empty file pointing to no where (will not point to ‘/gnu/store/…-twbs-3.3.5-dist/share/static/css’). More problems if exist another directory with a ‘css’ directory inside --8<---------------cut here---------------start------------->8--- (site #:builders (list (static-directory "static" "static")) …) --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ haunt build building pages in 'site'... copying asset 'guix-root-static/share/static/js/jquery.min.js' → '/static/js/jquery.min.js' copying asset 'guix-root-static/share/static/js/bootstrap.min.js' → '/static/js/bootstrap.min.js' copying asset 'guix-root-static/share/static/css' → '/static/css' copying asset 'static/js/disqus.js' → '/static/js/disqus.js' copying asset 'static/css/wigust.css' → '/static/css/wigust.css' Backtrace: 4 (primitive-load "/gnu/store/h0f4p5bbmg08pij804sg02l8n7h…") In ice-9/boot-9.scm: 152:2 3 (with-fluid* _ _ _) In ice-9/eval.scm: 619:8 2 (_ #(#(#(#(#<directory (haunt ui build) 291d1…>) …) …) …)) In srfi/srfi-1.scm: 640:9 1 (for-each #<procedure 8ea9000 at ice-9/eval.scm:333:13…> …) In unknown file: 0 (copy-file "static/css/wigust.css" "/home/natsu/src/hau…") ERROR: In procedure copy-file: ERROR: In procedure copy-file: Not a directory --8<---------------cut here---------------end--------------->8---
>From 80f8825b029f7ff7b6dc0c4d5e9056a035f8ee71 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov <go.wig...@gmail.com> Date: Mon, 12 Feb 2018 10:56:05 +0300 Subject: [PATCH] haunt: asset: Follow symlinks. * haunt/asset.scm (directory-assets)[file-system-fold]: Add 'stat' argument. --- haunt/asset.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haunt/asset.scm b/haunt/asset.scm index 2d9e27b..a4c60cd 100644 --- a/haunt/asset.scm +++ b/haunt/asset.scm @@ -79,4 +79,4 @@ files in DIRECTORY that match KEEP?, recursively." (define (err file-name stat errno memo) (error "asset processing failed with errno: " file-name errno)) - (file-system-fold enter? leaf noop noop noop err '() directory)) + (file-system-fold enter? leaf noop noop noop err '() directory stat)) -- 2.15.1
Oleg.