[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building from local (or private) git repository

From: Pierre Langlois
Subject: Re: building from local (or private) git repository
Date: Mon, 08 Jul 2019 17:13:38 +0100
User-agent: mu4e 1.2.0; emacs 26.2

Hi Robert,

Robert Vollmert 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!

If you're running the Guix system, you can setup a local git daemon that
serves your user's repos. Here's what I have in my config:

  #:config (git-daemon-configuration
             (export-all? #t)
             (user-path ""))) ;; To allow access to '~rob/puzzledb/tools'

And then I /think/ you should be able to do something like:

  (method git-fetch)
  (uri (git-reference
        (url "git://localhost/~rob/puzzledb/tools")
        (commit "<hash>")))

Note that's off the top of my head, I personally use this publish
channels in my local network rather than package sources, but I can't
think why this wouldn't work too!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]