* Package workspace relocation
@ 2020-11-16 20:15 Stephen Scheck
2020-11-16 20:56 ` Leo Famulari
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Scheck @ 2020-11-16 20:15 UTC (permalink / raw)
To: help-guix
Is there a way to relocate the package build workspace for a Git clone
source, e.g.:
(package
(name "my-package")
(version "0.0.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/my-package")))
(file-name (git-file-name name version))
This results in a path like `<guix-build-temp>/my-package-0.0.1` but
because of idiosyncrasies in the project's build system, I need for it to
be relocated to something like `<guix-build-temp>/foo/bar/my-package-0.0.1`.
How can I do this?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Package workspace relocation
2020-11-16 20:15 Package workspace relocation Stephen Scheck
@ 2020-11-16 20:56 ` Leo Famulari
2020-11-16 21:56 ` Stephen Scheck
0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2020-11-16 20:56 UTC (permalink / raw)
To: Stephen Scheck; +Cc: help-guix
On Mon, Nov 16, 2020 at 03:15:46PM -0500, Stephen Scheck wrote:
> Is there a way to relocate the package build workspace for a Git clone
> source, e.g.:
>
> (package
> (name "my-package")
> (version "0.0.1")
> (source (origin
> (method git-fetch)
> (uri (git-reference
> (url "https://github.com/my-package")))
> (file-name (git-file-name name version))
>
> This results in a path like `<guix-build-temp>/my-package-0.0.1` but
> because of idiosyncrasies in the project's build system, I need for it to
> be relocated to something like `<guix-build-temp>/foo/bar/my-package-0.0.1`.
>
> How can I do this?
I'm not sure that I fully understand what you are asking.
However, the location of the build directory is controlled by the TMPDIR
variable, which is set in the environment of the guix-daemon. You can
set it to any location that you want.
An alternative per-package approach is to add a build phase before the
'unpack' phase and do something like `mkdir -p foo/bar && chdir
foo/bar`.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Package workspace relocation
2020-11-16 20:56 ` Leo Famulari
@ 2020-11-16 21:56 ` Stephen Scheck
2020-11-16 23:09 ` zimoun
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Scheck @ 2020-11-16 21:56 UTC (permalink / raw)
To: Leo Famulari; +Cc: help-guix
I just need to add a prefix to the directory in which the Git source is
cloned, because its build system requires that. I don't care which TMP
directory Guix daemon uses for its build root. I just need for
`/my-project` to become `/foo/bar/my-project`. It sounds like what you
suggested will do the trick, if I understand it correctly.
Thanks.
On Mon, Nov 16, 2020 at 3:56 PM Leo Famulari <leo@famulari.name> wrote:
> On Mon, Nov 16, 2020 at 03:15:46PM -0500, Stephen Scheck wrote:
> > Is there a way to relocate the package build workspace for a Git clone
> > source, e.g.:
> >
> > (package
> > (name "my-package")
> > (version "0.0.1")
> > (source (origin
> > (method git-fetch)
> > (uri (git-reference
> > (url "https://github.com/my-package")))
> > (file-name (git-file-name name version))
> >
> > This results in a path like `<guix-build-temp>/my-package-0.0.1` but
> > because of idiosyncrasies in the project's build system, I need for it to
> > be relocated to something like
> `<guix-build-temp>/foo/bar/my-package-0.0.1`.
> >
> > How can I do this?
>
> I'm not sure that I fully understand what you are asking.
>
> However, the location of the build directory is controlled by the TMPDIR
> variable, which is set in the environment of the guix-daemon. You can
> set it to any location that you want.
>
> An alternative per-package approach is to add a build phase before the
> 'unpack' phase and do something like `mkdir -p foo/bar && chdir
> foo/bar`.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Package workspace relocation
2020-11-16 21:56 ` Stephen Scheck
@ 2020-11-16 23:09 ` zimoun
2020-11-17 7:23 ` Efraim Flashner
0 siblings, 1 reply; 6+ messages in thread
From: zimoun @ 2020-11-16 23:09 UTC (permalink / raw)
To: Stephen Scheck, Leo Famulari; +Cc: help-guix
Dear,
On Mon, 16 Nov 2020 at 16:56, Stephen Scheck <singularsyntax@gmail.com> wrote:
> `/my-project` to become `/foo/bar/my-project`. It sounds like what you
[...]
>> > This results in a path like `<guix-build-temp>/my-package-0.0.1` but
>> `<guix-build-temp>/foo/bar/my-package-0.0.1`.
What do you want? Append a suffix /tmp/guix-xyz/foo/bar/your-pkg or a
prefix /tmp/foo/bar/guix-xyz/your-pkg?
Change the prefix means changing the TMPDIR environment variable of
guix-daemon (priviliged user).
At first look, I do not know how to add something between guix-xyz-drv-0/
and your-pkg/. Curious to know how. :-)
Hope that helps,
simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Package workspace relocation
2020-11-16 23:09 ` zimoun
@ 2020-11-17 7:23 ` Efraim Flashner
2020-11-17 13:07 ` zimoun
0 siblings, 1 reply; 6+ messages in thread
From: Efraim Flashner @ 2020-11-17 7:23 UTC (permalink / raw)
To: zimoun; +Cc: help-guix, Stephen Scheck
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
On Tue, Nov 17, 2020 at 12:09:35AM +0100, zimoun wrote:
> Dear,
>
> On Mon, 16 Nov 2020 at 16:56, Stephen Scheck <singularsyntax@gmail.com> wrote:
>
> > `/my-project` to become `/foo/bar/my-project`. It sounds like what you
>
> [...]
>
> >> > This results in a path like `<guix-build-temp>/my-package-0.0.1` but
> >> `<guix-build-temp>/foo/bar/my-package-0.0.1`.
>
> What do you want? Append a suffix /tmp/guix-xyz/foo/bar/your-pkg or a
> prefix /tmp/foo/bar/guix-xyz/your-pkg?
>
> Change the prefix means changing the TMPDIR environment variable of
> guix-daemon (priviliged user).
>
> At first look, I do not know how to add something between guix-xyz-drv-0/
> and your-pkg/. Curious to know how. :-)
>
I think I'd go with
(add-after 'unpack 'move-source
(lambda _
(mkdir-p "foo/bar")
(rename-file "my-project" "foo/bar/my-project")
#t))
With that you'll be in <guix-build-temp> and you can chdir into whatever
directory you want. Or you could change the source so it doesn't expect
the source to be deep in a directory structure.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-11-17 13:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 20:15 Package workspace relocation Stephen Scheck
2020-11-16 20:56 ` Leo Famulari
2020-11-16 21:56 ` Stephen Scheck
2020-11-16 23:09 ` zimoun
2020-11-17 7:23 ` Efraim Flashner
2020-11-17 13:07 ` zimoun
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.