GNU bug report logs - #54003
'local-file' fails to resolve relative file names with Guile 3.0.8

Previous Next

Package: guix;

Reported by: Aleksandr Vityazev <avityazev <at> posteo.org>

Date: Mon, 14 Feb 2022 21:51:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Aleksandr Vityazev <avityazev <at> posteo.org>
To: 54003 <at> debbugs.gnu.org
Subject: bug#54003: local-file after Guile update
Date: Mon, 14 Feb 2022 21:50:08 +0000
Hi,

I have the following dotfiles directory structure where I store my Guix home
config:

|-etc
|
|-subdir
|   |
|   |-home


I often use the 'local-file' procedure in modules in the home directory. For
example in /subdir/home/shells.scm:

#+begin_src scheme :scheme guile :season guile
(simple-service 'add-zsh-files
                home-files-service-type
                `(("config/zsh/zshrc"
                   ,(local-file "../../etc/zsh/zshrc"))))
#+end_src
And it works, as expected.

The following example also worked before the
076e825dc5d585943ce820a279fffe4af09757fb (gnu: guile: Add version 3.0.8 as
'guile-3.0-latest') commit.

in /subdir/home/wm.scm: 
#+begin_src scheme :scheme guile :season guile
(service
 home-rofi-service-type
 (home-rofi-configuration
  (config-rasi
   `(,#~(format
         #f "@theme \"~a\""
         #$(local-file "../../etc/rofi/nord.rasi"))))))
#+end_src

After 076e825dc5d585943ce820a279fffe4af09757fb
using (local-file "../../etc/rofi/nord.rasi") and not
(local-file "etc/rofi/nord.rasi") causes an error:

guix home: error: canonicalize-path: No such file or
directory: "../../etc/rofi/nord.rasi".

The example that causes the error uses the original Guix home implementation,
which uses gexps.  When I figure out how to make a minimal reproducer that
does not depend on it, I will update this report.

-- 
Best regards,
Aleksandr Vityazev




This bug report was last modified 3 years and 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.