[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request: build package with source tarball
From: |
Maxime Devos |
Subject: |
Re: Request: build package with source tarball |
Date: |
Mon, 12 Sep 2022 10:59:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 |
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.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature