From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44962) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlG8R-0007en-8C for guix-patches@gnu.org; Wed, 10 Jul 2019 13:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlG8Q-00024c-7V for guix-patches@gnu.org; Wed, 10 Jul 2019 13:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55935) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlG8Q-00024P-4F for guix-patches@gnu.org; Wed, 10 Jul 2019 13:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlG8P-0001AB-UA for guix-patches@gnu.org; Wed, 10 Jul 2019 13:12:01 -0400 Subject: [bug#36578] [PATCH 1/9] derivations: 'derivation' primitive accepts and #:sources. References: <20190710170408.21321-1-ludo@gnu.org> In-Reply-To: <20190710170408.21321-1-ludo@gnu.org> Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 10 Jul 2019 19:11:20 +0200 Message-Id: <20190710171128.21568-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36578@debbugs.gnu.org This brings us closer to the data type. * guix/derivations.scm (derivation): Add #:sources parameter. [input->derivation-input]: Add clause for 'derivation-input?'. Honor SOURCES. --- guix/derivations.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/guix/derivations.scm b/guix/derivations.scm index 731f1f698f..bd0af320c4 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -708,7 +708,8 @@ name of each input with that input's hash." (define* (derivation store name builder args #:key (system (%current-system)) (env-vars '()) - (inputs '()) (outputs '("out")) + (inputs '()) (sources '()) + (outputs '("out")) hash hash-algo recursive? references-graphs allowed-references disallowed-references @@ -833,6 +834,8 @@ derivation. It is kept as-is, uninterpreted, in the derivation." (define input->derivation-input (match-lambda + ((? derivation-input? input) + input) (((? derivation? drv)) (make-derivation-input drv '("out"))) (((? derivation? drv) sub-drvs ...) @@ -858,7 +861,8 @@ derivation. It is kept as-is, uninterpreted, in the derivation." hash recursive?))) (sort outputs stringsource inputs)) + (append (filter-map input->source inputs) + sources)) stringderivation-input inputs)) -- 2.22.0