From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id kGb7JhzgJGbrOwAA62LTzQ:P1 (envelope-from ) for ; Sun, 21 Apr 2024 11:45:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kGb7JhzgJGbrOwAA62LTzQ (envelope-from ) for ; Sun, 21 Apr 2024 11:45:00 +0200 X-Envelope-To: larch@yhetil.org 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713692700; a=rsa-sha256; cv=none; b=ocXL+nk9yfJjYxG+3vJyAjUtOta+vkp6fRK/BHtiy1P/FAyvmLnzVrWitVkto9NbjHUjac tq+ZUFz/R6oTuN4eHv06yRbLmEav6P/F4yPYioaeTkluzFdogyB3nc4keN2ovMXPn8m7y4 TIyVJqND1eGMtEHsLxVoIAL8z92jXFrZIJT80GweWcCYlWSy5g6bX9z+D2l/20QwkGxlKX QxGSkvijK3sVkS/kuWP4NGZ0tPThJDCsVidy0gt8xe8l2RsN43qYz130Zb9BHxze5b1BM0 89yn6D9dBsq8ZK8wJ8YM1zlfLTRO8S4oGJWzh+Y/nwMzy7uhT1UgpJWAgqErzQ== 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713692700; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=43RNW62rJH5WWErf76sG8AnSkcHqLj9V94SEuOIpN6w=; b=PJOuXv60RcPuKDZ06Y4CEYXS46kS4S76MmcGz4zKk8BHRS0vhqYPOR+kr69Qg/eFruJSra sEq/UwEaYUMu7tqvPbofk2ZW2HqRdxvfbOJPosU3DdXN8g/q8r6uFx1nd7XB8BO/NzxH5/ kEl672kSf/ZYGqW2ftTW0PRhS0fZASQK9TSb1MfBaDHfTx5eihstXvltXZ3LJtBEeCugIy hNk5RF4BfbGGw3Fh80d5oQIzYVyRUxoprGExRmBcfT0RcBdFdt9UyPVQhiIp4B4brwBiEA KJRybwa7i5Ks2tvCCI140altB3qVU3w8CyWTOLE3C+4iaJLnh4QRy/dbfZMMIg== 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 7EAC8269E4 for ; Sun, 21 Apr 2024 11:45:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryTjy-0005XJ-RD; Sun, 21 Apr 2024 05:44:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryTjl-0005Qb-6O for guix-patches@gnu.org; Sun, 21 Apr 2024 05:43:55 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ryTjk-0002md-EO; Sun, 21 Apr 2024 05:43:52 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ryTjx-0006U7-J3; Sun, 21 Apr 2024 05:44:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70494] [PATCH 08/23] store: Add text-output-path and text-output-path-from-hash. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 21 Apr 2024 09:44:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70494 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70494@debbugs.gnu.org Cc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 70494-submit@debbugs.gnu.org id=B70494.171369260624475 (code B ref 70494); Sun, 21 Apr 2024 09:44:05 +0000 Received: (at 70494) by debbugs.gnu.org; 21 Apr 2024 09:43:26 +0000 Received: from localhost ([127.0.0.1]:41766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryTjJ-0006MQ-13 for submit@debbugs.gnu.org; Sun, 21 Apr 2024 05:43:26 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryTix-0006I0-KR for 70494@debbugs.gnu.org; Sun, 21 Apr 2024 05:43:05 -0400 Received: from localhost (unknown [212.132.255.10]) by mira.cbaines.net (Postfix) with ESMTPSA id 70C0327BBF0 for <70494@debbugs.gnu.org>; Sun, 21 Apr 2024 10:42:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id f194f578 for <70494@debbugs.gnu.org>; Sun, 21 Apr 2024 09:42:46 +0000 (UTC) From: Christopher Baines Date: Sun, 21 Apr 2024 10:42:26 +0100 Message-ID: <07a1cd0965422c6bdbcdf52834cd33cee7951114.1713692561.git.mail@cbaines.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <87bk632h36.fsf@cbaines.net> References: <87bk632h36.fsf@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -3.38 X-Migadu-Queue-Id: 7EAC8269E4 X-Migadu-Spam-Score: -3.38 X-Migadu-Scanner: mx10.migadu.com X-TUID: NgMZnquuf8Yw * guix/store.scm (text-output-path, text-output-path-from-hash): New procedures. Change-Id: I38c3aaa0b304dd4f97a222a1065eb1b7f55bbfad --- guix/store.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/guix/store.scm b/guix/store.scm index 578e46507e..b83f205096 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -196,6 +196,8 @@ (define-module (guix store) store-path output-path fixed-output-path + text-output-path + text-output-path-from-hash store-path? direct-store-path? derivation-path? @@ -2280,6 +2282,20 @@ (define* (fixed-output-path name hash (sha256 (string->utf8 tag)) name)))) +(define (text-output-path name text references) + (text-output-path-from-hash + name + (sha256 (string->utf8 text)) + references)) + +(define* (text-output-path-from-hash name text-hash references) + (store-path + (string-append "text" (string-join (sort references string