[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request: build package with source tarball
From: |
Olivier Dion |
Subject: |
Re: Request: build package with source tarball |
Date: |
Sun, 11 Sep 2022 21:29:47 -0400 |
On Mon, 12 Sep 2022, Ryan Prior <rprior@protonmail.com> wrote:
> Hi there! Lately I've been testing distribution tarballs with a workflow like
> this:
>
> - update some software in my source directory
> - create a distribution tarball
> - untar to a directory like /tmp/mypkg-src
> - 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.
It already can.
I use this in my Makefiles:
--8<---------------cut here---------------start------------->8---
libpatch.tar.gz:
@git archive --format=tar.gz --prefix=libpatch/ \
--output $@ HEAD
guix-build: libpatch.tar.gz
@guix build --keep-failed --rounds=2 \
--with-source=libpatch=$^ libpatch
--8<---------------cut here---------------end--------------->8---
--
Olivier Dion
oldiob.dev