From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qIN3B5CE5F8KRQAA0tVLHw (envelope-from ) for ; Thu, 24 Dec 2020 12:07:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2OlTA5CE5F+mWAAA1q6Kng (envelope-from ) for ; Thu, 24 Dec 2020 12:07:44 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 55191940438 for ; Thu, 24 Dec 2020 12:07:43 +0000 (UTC) Received: from localhost ([::1]:45740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksPPA-00059z-W8 for larch@yhetil.org; Thu, 24 Dec 2020 07:07:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksPP2-00059H-Fl for help-guix@gnu.org; Thu, 24 Dec 2020 07:07:32 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:45210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksPOz-0005vr-T5 for help-guix@gnu.org; Thu, 24 Dec 2020 07:07:32 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id e5739f92; Thu, 24 Dec 2020 12:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:from:message-id; s=dkim; bh=3tibNzlARSVqIuIJULvIlAdp2cIQHyJa0kc0VVOE2RU=; b=jc8thD8qRHQo TIND/kp8vEVHwrBFGsdToZLmnRM8PP8eRKP9lyVUbP6cAYTGvUyUIWtfx4Ss1mF3 aRRczuUmIFcZHiORmAb437c8U+F16x0yQ7RZ+0Sd1J2bjIN9R4ZF5S/SNbHa//ot fPSYwl74pb/iMbHXgYL6QifEy5Hjktcq24tqxrj232za7V3FAQg82vdeDK5vbf02 6qsjPI0rEMgvIn4Qv6tZopa7713BXQp8rqNyex8ZkUucdUf+TDFpGBXmqPWfF+kW unveYuVDvW7fB6OQt5ydljckqL7LIQ7xzm9aOGNTaXZiWQKlKsZB0a16ESfuakHF Mi4uWW83Cw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 11088034 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Thu, 24 Dec 2020 12:07:24 +0000 (UTC) Date: Thu, 24 Dec 2020 07:07:18 -0500 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Subject: Re: help with copy-build-system To: help-guix@gnu.org,Cameron From: Julien Lepiller Message-ID: Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.27 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=lepiller.eu header.s=dkim header.b=jc8thD8q; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 55191940438 X-Spam-Score: 0.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: iK6mUBxRlVt3 I don't think this is related to the copy-build-system, because it doesn't = change the unpack phase=2E Whathappens here is that guix expects the conten= t of the tarball to be in a subdirectory, which is not the case here=2E In = the source definition, you should use url-fetch/tarbomb instead of url-fetc= h=2E Le 23 d=C3=A9cembre 2020 18:23:11 GMT-05:00, Cameron = a =C3=A9crit : >Hello, > >I am new to Guix but it seems to be the perfect tools for running a >small cluster of servers that I need to administer=2E The one thing that >so far is holding me back from doing so is the absence of a package for >Caddy (https://caddyserver=2Ecom) which this cluster relies on heavily=2E= I >hope in the future to package it properly, but it has a number of >golang dependencies that are not themselves even packaged, and I am far >from an expert on building Go software -- it seems doable but it would >be a relatively big undertaking=2E > >Instead, I thought I could create a private package with >copy-build-system and simply install the pre-built binaries that the >Caddy project provides=2E This is the caddy-package=2Escm that I have com= e >up with: >>=20 >> (use-modules (guix) >> (guix build-system copy) >> (guix build utils) >> (guix licenses)) >>=20 >>=20 >> (package >> (name "caddy") >>=20 >> (version "2=2E2=2E1") >>=20 >> (source >> (origin >> (method url-fetch) >> (uri (string-append >"https://github=2Ecom/caddyserver/caddy/releases/download/" version >"/caddy_" version "_linux_amd64=2Etar=2Egz")) >> (sha256 >> (base32 >> "1va2h8hpxcby9rny7px1y2xks79rxb4svnf9mrdrlc5xn0s04dsx")))) >>=20 >> (build-system copy-build-system) >>=20 >> (arguments >> '(#:install-plan '(("caddy" "bin/caddy")))) >>=20 >> (synopsis "This is a *BAD* Caddy package=2E It just pulls the >already-built binary from Github, rather than building from source=2E") >> (description "See https://caddyserver=2Ecom/") >> (home-page "https://caddyserver=2Ecom/") >> (license asl2=2E0)) > >When I build this file with `guix build -f caddy-package=2Escm -K', it >fails with this rather mysterious (to me) error during the unpack >phase: > >> starting phase `unpack' >> LICENSE >> README=2Emd >> caddy >> Backtrace: >> 8 (primitive-load >"/gnu/store/fa16h805lxm1fmyhdmnwd09cpd7=E2=80=A6") >> In ice-9/eval=2Escm: >> 191:35 7 (_ #f) >> In guix/build/gnu-build-system=2Escm: >> 838:2 6 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases =2E >#) >> In ice-9/boot-9=2Escm: >> 1736:10 5 (with-exception-handler _ _ #:unwind? _ # _) >> In srfi/srfi-1=2Escm: >> 857:16 4 (every1 # >=E2=80=A6) >> In guix/build/gnu-build-system=2Escm: >> 847:30 3 (_ _) >> 164:15 2 (unpack #:source _) >> 65:2 1 (first-subdirectory _) >> In ice-9/boot-9=2Escm: >> 1669:16 0 (raise-exception _ #:continuable? _) >>=20 >> ice-9/boot-9=2Escm:1669:16: In procedure raise-exception: >> Throw to key `match-error' with args `("match" "no matching pattern" >())'=2E >> note: keeping build directory `/tmp/guix-build-caddy-2=2E2=2E1=2Edrv-20= ' >> builder for >`/gnu/store/p65q2ndw8hcpiq2x62jb9mxv6xa88kkn-caddy-2=2E2=2E1=2Edrv' faile= d >with exit code 1 >> build of /gnu/store/p65q2ndw8hcpiq2x62jb9mxv6xa88kkn-caddy-2=2E2=2E1=2E= drv >failed >> View build log at >'/var/log/guix/drvs/p6/5q2ndw8hcpiq2x62jb9mxv6xa88kkn-caddy-2=2E2=2E1=2Ed= rv=2Ebz2'=2E >> guix build: error: build of >`/gnu/store/p65q2ndw8hcpiq2x62jb9mxv6xa88kkn-caddy-2=2E2=2E1=2Edrv' faile= d > >Would anyone be able to give me any advice here? This seems to comport >with the Reference Manual blurb >(https://guix=2Egnu=2Eorg/manual/en/guix=2Ehtml#index-copy_002dbuild_002d= system) >about copy-build-system and also appears similar to several official >packages using copy-build-system (e=2Eg=2E gcide, vim-neocomplete, >neverball) that I looked to as examples=2E Clearly though, there is some >nuance that I am missing=2E > >Thanks in advance for any help you can provide=2E > >-Cam Tindall