From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CFC3JziswWFYKQEAgWs5BA (envelope-from ) for ; Tue, 21 Dec 2021 11:28:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CGhOIziswWHDVAAAbx9fmQ (envelope-from ) for ; Tue, 21 Dec 2021 10:28:08 +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 0C4C42F175 for ; Tue, 21 Dec 2021 11:28:08 +0100 (CET) Received: from localhost ([::1]:35960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzcNL-0000We-2I for larch@yhetil.org; Tue, 21 Dec 2021 05:28:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzcNH-0000WT-99 for guix-patches@gnu.org; Tue, 21 Dec 2021 05:28:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzcNH-0000RZ-0T for guix-patches@gnu.org; Tue, 21 Dec 2021 05:28:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzcNG-0004Ez-Jb for guix-patches@gnu.org; Tue, 21 Dec 2021 05:28:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52699] [PATCH] gnu: Add nar-herder. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Dec 2021 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52699 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52699@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164008244116234 (code B ref -1); Tue, 21 Dec 2021 10:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2021 10:27:21 +0000 Received: from localhost ([127.0.0.1]:52444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzcMb-0004Dm-Et for submit@debbugs.gnu.org; Tue, 21 Dec 2021 05:27:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:37600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzcMX-0004DZ-OK for submit@debbugs.gnu.org; Tue, 21 Dec 2021 05:27:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzcMX-0000UG-HN for guix-patches@gnu.org; Tue, 21 Dec 2021 05:27:17 -0500 Received: from mira.cbaines.net ([212.71.252.8]:56408) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzcMV-0000Pg-O2 for guix-patches@gnu.org; Tue, 21 Dec 2021 05:27:17 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 561CC27BBE9 for ; Tue, 21 Dec 2021 10:27:12 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 031baa00 for ; Tue, 21 Dec 2021 10:27:11 +0000 (UTC) From: Christopher Baines Date: Tue, 21 Dec 2021 10:27:11 +0000 Message-Id: <20211221102711.30382-1-mail@cbaines.net> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640082488; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LgOv0ZUk0wF2/eI3roQs7aaae636fQkLpeKlnnQ/B/8=; b=lw8OvmK3HqCR8SrywHDH7Nw77C6LLG/hRk8C48kO9UBxakTpi/3i0h5yGUyoHx0Dx3QB5W ZcwrMVRj4xZV1cDpuB0iQa/lhQ70I0/7ZmwLFS9SAH4mH6t9EYu/3gVP/1q9qKofOGmLF1 HoQCeBmREfd4WC9RcMRW6fGA8wTY8r2zxzlxGHrxeDx5A3LkKDxALQd4sWPCkVvT99CY2j D66Y5FRESSkxDeLnmx6rX2LvNuuwaSk4mMQ64yNTcD6YE0n8cqeX8UEADVb+kuIj9OL1Qr CMPn2ubiePWfeewPc8RuGjkxT7I2HRRlfWHcTa9AtsqJaIAUzJZ4cdb43f0D7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640082488; a=rsa-sha256; cv=none; b=acyjSHXdcjO3Qsdtms2UdUX27UIpc50eQoRdMZUlBJZP91vPIZUKdz1KAweB3h3LUBwMt4 usHqxV2tsjZy9qYz/DpPpyKNu490sN8fq/oFosKpGzylcQP2+6NIVFIvnUy4vKJ/LDL4Ar XIZpZm7tYmOX8Mb7YNx9kOXCejwbPbsIAJr//RpH1mIYsp7F0X33OTLwo6fVl5TFoU00GO IkKgst3EkByBc2N8UI+UdCwCw7jkkY4O/PpP8cKolt0O9k05Qw02BFNQJQmp8ldpK4DU5v PxXNM6xG/tMIU4yngdJi+914gXJ19koAW/PsFO5OecQ4wJLxBjji+Hm3xZMltw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.03 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0C4C42F175 X-Spam-Score: -3.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: wajkgCMBXYE8 * gnu/packages/package-management.scm (nar-herder): New variable. --- gnu/packages/package-management.scm | 109 ++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 12736c6caf..feb56f2a9b 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1441,6 +1441,115 @@ (define-public guix-jupyter in an isolated environment, in separate namespaces.") (license license:gpl3+))) +(define-public nar-herder + (let ((commit "049dfec287fa948cac6682d0a047bc0ed356f0bf") + (revision "1")) + (package + (name "nar-herder") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.cbaines.net/git/guix/nar-herder") + (commit commit))) + (sha256 + (base32 + "1bkn6avcyp2rcrqaync65b8yn9dvxlkjpk3mdk5nsy527dzhs5ws")) + (file-name (string-append name "-" version "-checkout")))) + (build-system gnu-build-system) + (arguments + `(#:modules (((guix build guile-build-system) + #:select (target-guile-effective-version)) + ,@%gnu-build-system-modules) + #:imported-modules ((guix build guile-build-system) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (add-before 'build 'set-GUILE_AUTO_COMPILE + (lambda _ + ;; To avoid warnings relating to 'guild'. + (setenv "GUILE_AUTO_COMPILE" "0") + #t)) + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs target #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (guile (assoc-ref inputs "guile")) + (version (target-guile-effective-version)) + (scm (string-append out "/share/guile/site/" version)) + (go (string-append out "/lib/guile/" version "/site-ccache"))) + (for-each + (lambda (file) + (simple-format (current-error-port) "wrapping: ~A\n" file) + (let ((guile-inputs (list + "guile-json" + "guile-gcrypt" + "guix" + "guile-lib" + "guile-sqlite3" + "gnutls" + "guile-fibers"))) + (wrap-program file + `("GUILE_LOAD_PATH" ":" prefix + (,scm ,(string-join + (map (lambda (input) + (simple-format + #f "~A/share/guile/site/~A" + (assoc-ref inputs input) + version)) + guile-inputs) + ":"))) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix + (,go ,(string-join + (map (lambda (input) + (simple-format + #f "~A/lib/guile/~A/site-ccache" + (assoc-ref inputs input) + version)) + guile-inputs) + ":")))))) + (find-files bin))) + #t)) + (delete 'strip)))) ; As the .go files aren't compatible + (native-inputs + (list pkg-config + autoconf + automake + gnutls + + ;; Guile libraries are needed here for cross-compilation. + guile-3.0 + guile-json-4 + guile-gcrypt + guix + guile-fibers + guile-lib + guile-sqlite3)) + (inputs + (list bash-minimal + guile-3.0)) + (propagated-inputs + (list guile-json-4 + guile-gcrypt + guix + guile-fibers + guile-lib + guile-sqlite3 + gnutls)) + (home-page "https://git.cbaines.net/guix/nar-herder") + (synopsis "Utility for managing and serving nars") + (description + "The Nar Herder is a utility for managing a collection of +nars (normalized archives, in the context of Guix) along with the +corresponding narinfo files which contain some signed metadata. + +It can assist in serving a collection of nars, moving them between machines, +or mirroring an existing collection of nars. + +It's currently a working prototype, many designed features aren't implemented, +and the error handling is very rough.") + (license license:gpl3+)))) + (define-public gcab (package (name "gcab") -- 2.33.1