unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Ryan Prior <rprior@protonmail.com>, Guix Devel <guix-devel@gnu.org>
Subject: Re: Request: build package with source tarball
Date: Mon, 12 Sep 2022 10:59:38 +0200	[thread overview]
Message-ID: <5b9c8d62-f536-2cb4-bfa4-51720b290458@telenet.be> (raw)
In-Reply-To: <SyzAJwILmcGTAir5vMOzjCqaVfNmiFOt8MYZN_3D2sRYCdbHUwb8XlNgbeDPntOxgJR-8t-xwvc9Eica6U4NM5RfGVe_0CZC2Ub8nvsN_Oc=@protonmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1335 bytes --]



On 12-09-2022 03:04, Ryan Prior wrote:
> Hi there! Lately I've been testing distribution tarballs with a workflow 
> like this:
> 
>  1. update some software in my source directory
>  2. create a distribution tarball
>  3. untar to a directory like /tmp/mypkg-src
>  4. run: |guix build --with-source=mypkg=/tmp/mypkg-src|​
> 
> 
> It would be nice to skip step 3 there and just run: |guix build 
> --with-source=mypkg.tar.gz|​
> Guix should then untar and use the result as the source directory for 
> the build.

I believe you can do that already -- "guix build" accepts not only 
directories, but also regular files.

For example, the following builds the 'hello' package, but with the 
source code of 'sed' instead of 'hello' (doesn't make much sense, but 
just an example):

$ guix build hello "--with-source=hello=$(guix build --source sed)"

(no need to unpack tarballs!)


> To soup the process up even further, allow |--with-source|​ to take a 
> URL of a tarball, in which case Guix fetches and untars.

That is already supported:

$ guix build hello "--with-source=hello=file://$(guix build --source sed)"
(succeeds)

$ guix build hello "--with-source=hello=http://localhost/hello.tar.gz"
(network errors, because I don't actually have a tarball there.)

Greetings,
Maxime.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

      parent reply	other threads:[~2022-09-12  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12  1:04 Request: build package with source tarball Ryan Prior
2022-09-12  1:29 ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-09-12  1:35   ` Ryan Prior
2022-09-12  8:59 ` Maxime Devos [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=5b9c8d62-f536-2cb4-bfa4-51720b290458@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=guix-devel@gnu.org \
    --cc=rprior@protonmail.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).