From: Attila Lendvai <attila@lendvai.name>
To: Andy Tai <atai@atai.org>
Cc: guix-devel@gnu.org
Subject: Re: package definition question: referring to source files of another package?
Date: Sun, 03 Sep 2023 12:12:26 +0000 [thread overview]
Message-ID: <GaW9elo2jr8kNwNtbd4bM2963cmzudl1GMlgu5GyRsGT4mk0PaiUbzNveDIJJ123tr9rfTH1mDF2ZSQ2EywcPEEMc-S26LoyPXpUA2muLkY=@lendvai.name> (raw)
In-Reply-To: <CAJsg1E9LJYgKWRDA4t6BRD82mcO2s8fMWYrGqB-5hYGbRDcP9Q@mail.gmail.com>
> In some scenarios package A may refer to source files in package B.
depending on where and what you need, you can do something like this in a GEXP context:
(define (upstream-file relative-path)
(let ((git-origin
(let ((commit "v0.13.2"))
(origin
(method git-fetch)
(uri (git-reference
(url ...)
(commit commit)))
(file-name (git-file-name "foo-bar" commit))
(sha256
(base32 ...))))))
(file-append git-origin relative-path)))
#~(let ((x #$(upstream-file "/some-path"))) ...)
this way the versioning of the two packages are not tied together, which may or may not be what you want from a semantics perspective.
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“There are some ideas so wrong that only a very intelligent person could believe in them.”
— George Orwell (1903–1950)
prev parent reply other threads:[~2023-09-03 12:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-03 3:35 package definition question: referring to source files of another package? Andy Tai
2023-09-03 4:18 ` Liliana Marie Prikler
2023-09-05 6:28 ` Andy Tai
2023-09-03 12:12 ` Attila Lendvai [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='GaW9elo2jr8kNwNtbd4bM2963cmzudl1GMlgu5GyRsGT4mk0PaiUbzNveDIJJ123tr9rfTH1mDF2ZSQ2EywcPEEMc-S26LoyPXpUA2muLkY=@lendvai.name' \
--to=attila@lendvai.name \
--cc=atai@atai.org \
--cc=guix-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.