[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: building from local (or private) git repository
From: |
Marius Bakke |
Subject: |
Re: building from local (or private) git repository |
Date: |
Mon, 08 Jul 2019 18:39:40 +0200 |
User-agent: |
Notmuch/0.29.1 (https://notmuchmail.org) Emacs/26.2 (x86_64-pc-linux-gnu) |
Robert Vollmert <address@hidden> 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.
signature.asc
Description: PGP signature