From: Marius Bakke <mbakke@fastmail.com>
To: Robert Vollmert <rob@vllmrt.net>, guix-devel@gnu.org
Subject: Re: building from local (or private) git repository
Date: Mon, 08 Jul 2019 18:39:40 +0200 [thread overview]
Message-ID: <87wogspjjn.fsf@devup.no> (raw)
In-Reply-To: <AC91930B-B7CF-4B52-BBE8-1354419B4DA7@vllmrt.net>
[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]
Robert Vollmert <rob@vllmrt.net> writes:
> Hi all,
>
> I realize this isn’t generally an aim for guix proper, but I’d like
> to be able to build a package from a local git repository (or
> optionally from a local tar ball). In my specific case, it’s while
> working out the packaging of a project I intend to publish but
> haven’t published yet.
>
> What I have working so far uses local-file, as below:
>
> (define-public puzzledb-tools
> (package
> (name "puzzledb-tools")
> (version "20190625-git")
> (source
> (local-file
> "/home/rob/puzzledb/tools"
> #:recursive? #t))
> …
>
> That’s a bit annoying because it includes stale files that happen
> to be in the directory, it doesn’t check the hash, etc. Using a
> git origin with a local path doesn’t work for reasons I don’t
> completely understand — I think it’s because the guix-daemon builds
> in a namespace without access to the local filesystem. Perhaps there’s
> a way to link the git repository into that namespace?
>
> Any hints appreciated!
I typically just use (source "/some/repository"), though I don't
remember whether it automatically creates a fixed-output derivation for
the directory in question. Probably not.
(local-file ...) should, though (I think); but you'll have to trick it
into ignoring ".git" by passing it a #:select? predicate.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2019-07-08 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 15:52 building from local (or private) git repository Robert Vollmert
2019-07-08 16:13 ` Pierre Langlois
2019-07-08 16:39 ` Marius Bakke [this message]
2019-07-11 16:20 ` Ludovic Courtès
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=87wogspjjn.fsf@devup.no \
--to=mbakke@fastmail.com \
--cc=guix-devel@gnu.org \
--cc=rob@vllmrt.net \
/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).