unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Robert Vollmert <rob@vllmrt.net>
Cc: guix-devel@gnu.org
Subject: Re: building from local (or private) git repository
Date: Thu, 11 Jul 2019 18:20:26 +0200	[thread overview]
Message-ID: <8736jcsfud.fsf@gnu.org> (raw)
In-Reply-To: <AC91930B-B7CF-4B52-BBE8-1354419B4DA7@vllmrt.net> (Robert Vollmert's message of "Mon, 8 Jul 2019 17:52:38 +0200")

Robert Vollmert <rob@vllmrt.net> skribis:

> 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))
>   …

FWIW that’s what ‘--with-source’ does.

> That’s a bit annoying because it includes stale files that happen
> to be in the directory, it doesn’t check the hash, etc.

Like Marius wrote, you could pass #:select?

  (local-file …
              #:select? (git-predicate "/home/rob/puzzledb/tools"))

> 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?

Build processes for origins work in the global namespaces, with access
to the network and to everything.  So I think something like this should
work:

  (origin
    (method url-fetch)
    (url "/home/rob/puzzledb/tools")
    (sha256 …))

HTH!

Ludo’.

      parent reply	other threads:[~2019-07-11 16:20 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
2019-07-11 16:20 ` Ludovic Courtès [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=8736jcsfud.fsf@gnu.org \
    --to=ludo@gnu.org \
    --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).