unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: paul <goodoldpaul@autistici.org>
To: Reza Housseini <reza.housseini@gmail.com>, guix-devel@gnu.org
Subject: Re: Version from file in a package
Date: Fri, 22 Sep 2023 15:11:06 +0200	[thread overview]
Message-ID: <44d579dd-652b-a2d2-6714-ff1c45c45300@autistici.org> (raw)
In-Reply-To: <1d2a4522-3844-403b-1c09-aeb423bf4d28@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Hi Reza,

I believe local-file should import (guix utils) and use 
current-source-directory. Something like:

(define %cwd (current-source-directory))

(let ([...]
       (version-file (string-append %cwd "/VERSION"))

   [...]

    (source (local-file (string-append %cwd "/../..") "my-package-checkout"
   
   [...]

The current directory may not be where the VERSION file is.

giacomo

[-- Attachment #2: Type: text/html, Size: 596 bytes --]

  reply	other threads:[~2023-09-22 13:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 12:20 Version from file in a package Reza Housseini
2023-09-22 13:11 ` paul [this message]
2023-09-23 12:22 ` Attila Lendvai

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=44d579dd-652b-a2d2-6714-ff1c45c45300@autistici.org \
    --to=goodoldpaul@autistici.org \
    --cc=guix-devel@gnu.org \
    --cc=reza.housseini@gmail.com \
    /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).