From: "Ludovic Courtès" <ludo@gnu.org>
To: wldhx <wldhx@wldhx.me>
Cc: guix-devel@gnu.org
Subject: Re: (current-filename) behaves differently in environment|build
Date: Mon, 08 Apr 2019 11:14:41 +0200 [thread overview]
Message-ID: <87zhp0zwn2.fsf@gnu.org> (raw)
In-Reply-To: <49dd27e8-a153-745a-4664-4ec97e2da1d3@wldhx.me> (wldhx's message of "Mon, 1 Apr 2019 02:42:30 +0300")
Hello,
wldhx <wldhx@wldhx.me> skribis:
> Discovered following behaviour while setting up GNUnet CI:
>
> Given
>
> ./gnu/packages/a.scm:
> ...
> (source (local-file (dirname (current-filename))))
> ...
It’s enough to write:
(local-file ".." #:recursive? #t)
since ‘local-file’ already takes care of resolving the file name
relative to the current source file.
Does that work for you?
> export GUIX_PACKAGE_PATH=$PWD
>
> `(current-filename)` returns `#f` when evaluated via `guix environment`,
> while `guix build` does fine. Is this expected? Am I doing something wrong?
No, there shouldn’t be any difference.
Thanks, and apologies for the delay!
Ludo’.
prev parent reply other threads:[~2019-04-08 9:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-31 23:42 (current-filename) behaves differently in environment|build wldhx
2019-04-08 9:14 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhp0zwn2.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=wldhx@wldhx.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).