From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: building from local (or private) git repository Date: Mon, 08 Jul 2019 18:39:40 +0200 Message-ID: <87wogspjjn.fsf@devup.no> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:51700) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkWgA-0002TL-8F for guix-devel@gnu.org; Mon, 08 Jul 2019 12:39:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkWg8-0008Ok-8R for guix-devel@gnu.org; Mon, 08 Jul 2019 12:39:50 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48287) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkWg4-0008Jx-FO for guix-devel@gnu.org; Mon, 08 Jul 2019 12:39:46 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Robert Vollmert , guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Robert Vollmert writes: > Hi all, > > I realize this isn=E2=80=99t generally an aim for guix proper, but I=E2= =80=99d 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=E2=80=99s while > working out the packaging of a project I intend to publish but > haven=E2=80=99t 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)) > =E2=80=A6 > > That=E2=80=99s a bit annoying because it includes stale files that happen > to be in the directory, it doesn=E2=80=99t check the hash, etc. Using a > git origin with a local path doesn=E2=80=99t work for reasons I don=E2=80= =99t > completely understand =E2=80=94 I think it=E2=80=99s because the guix-dae= mon builds > in a namespace without access to the local filesystem. Perhaps there=E2= =80=99s > 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl0jccwACgkQoqBt8qM6 VPp8Bgf/SnAI/Z33Y7jPnc+dp1BsVAzNObWjUbtYLVcLKaNR7L2KyIojKEdHBEoh d9KYLLR98izh02zcD8j0AUNgfqXY7h1bgwPKKBO61k5zN+hPyDBTBH1HnhKzcePN BJ8Lnsiddy0e6xiCI9Jkf0TEngAxlcXasmF8745I20ncgaVCw+OR5q3se02OvFLE Mm9calCsNnYLRjY7qWVysPzlfbUxqJuKxFUB5GftrSXewrF33S55ohZbckt7aiSs 5yLPgR38NNF8EVqswnNF+R6U4zFstlM8zucb2u8uS/fWDnXohKc3eGQ/K+ztTRN5 D/dUAiuFI+pCQlbZBOTc+qwwCb55cA== =Easj -----END PGP SIGNATURE----- --=-=-=--