From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UKhCFYrx5mI3VQEAbAwnHQ (envelope-from ) for ; Sun, 31 Jul 2022 23:18:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SPE9FYrx5mKG3QAA9RJhRA (envelope-from ) for ; Sun, 31 Jul 2022 23:18:02 +0200 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 0559F3EA10 for ; Sun, 31 Jul 2022 23:18:02 +0200 (CEST) Received: from localhost ([::1]:60092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIGK1-0000Wm-3e for larch@yhetil.org; Sun, 31 Jul 2022 17:18:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIGJr-0000WK-Hb for gwl-devel@gnu.org; Sun, 31 Jul 2022 17:17:55 -0400 Received: from smtp.polymtl.ca ([132.207.4.11]:42091) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIGJn-00061v-Rk for gwl-devel@gnu.org; Sun, 31 Jul 2022 17:17:49 -0400 Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 26VLHYOk030315; Sun, 31 Jul 2022 17:17:39 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 26VLHYOk030315 To: Liliana Marie Prikler , gwl-devel@gnu.org Subject: Re: GWL 0.5 fails with plain packages In-Reply-To: <87sfmh1hai.fsf@laura> References: <18bd5afb0a09902a23e183cc26ccaf85f08009c0.camel@ist.tugraz.at> <877d3w2ai5.fsf@laura> <871qu230ad.fsf@laura> <419a1412b788843c69103f98f0c47701a540e54e.camel@ist.tugraz.at> <87wnbt1k6m.fsf@laura> <87sfmh1hai.fsf@laura> Date: Sun, 31 Jul 2022 17:17:33 -0400 Message-ID: <87pmhl0yoi.fsf@laura> MIME-Version: 1.0 Content-Type: text/plain X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Sun, 31 Jul 2022 21:17:34 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: gwl-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gwl-devel-bounces+larch=yhetil.org@gnu.org Sender: "gwl-devel" Reply-to: Olivier Dion From: Olivier Dion via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659302282; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=BdFQeq4iIpmdDw7On4F2cn7SGK8yvs5ddhovdTZEfD8=; b=hZ9qjFkKz9VJu7PA6kqohJNAwiSzeaN7plDMFcaefiJdGMbUVtVW3pOQGl8DncoDtFu8b6 qbS1COWvRQpg907gi/kduUUCvWiRhnNwieeZ2wOIuMsmufDp2PPlHmgKu4dX1nJuuzF416 Gf8+9wr3LxkP6bynlc8x22MnrIlcqGKCi+X9B7yN98tunzPgOH2XCTrHv/TrLJtHKidvQ3 KK60KAtETNNR1F9ljv5if0QbexzrRQ29j0gZCHis7Grr2VBdnh97JsoxwAMdS4V3dSs0aN yr4MtrLhW3BNFcJEYNACN/bopUj96dYvePjdMYEWvCe5oecv4lTYIAC9PqdcgQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659302282; a=rsa-sha256; cv=none; b=kuxxFK/D1VPjEizWfzUQ9LK71O4IWI7RvHiKktYTBIe0LdNwlsiyTsgvx19cvKx99m2QsH FidkaduKqaH4E8Lg1iZutCmv+X7M9Ro1D8MPXK16NChPydJa44UQH/dX2KCEZheYFJZMBi +EHQzfGeMT26rFgV+7Tcak5gzXgj+LnjsoCfUgNFyu+mbORU6fu/lo0tOojv21IBovOTPk Kzdz09kO/HJdNHcnl5RQa27Rm/qg2Nz6NP9fo60mItNg16D6uBBu+l2cx1pa6S5Jr9zOjR 24wdnkAej7JUm5FOHaoeRmd0YaaS2ZvESCxppKpdTcKsMAwB0C/+QgERLCY5zA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0559F3EA10 X-Spam-Score: -3.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: xIpVVUFp9rtt This patch should now have all outputs in _GWL_PROFILE. There's still a problem with the derivation though. --8<---------------cut here---------------start------------->8--- diff --git a/gwl/packages.scm b/gwl/packages.scm index 6a598ba..2ad3929 100644 --- a/gwl/packages.scm +++ b/gwl/packages.scm @@ -43,10 +43,11 @@ #:export (current-guix inferior-store + add-package-output! lookup-package valid-package? package-name - package-output + package-outputs bash-minimal build-time-guix @@ -86,7 +87,7 @@ (_ (raise (condition (&gwl-package-error (package-spec specification)))))))) - (set! (package-output package) output) + (add-package-output! package output) package)) (define (valid-package? val) @@ -110,7 +111,14 @@ the version. By default, DELIMITER is \"@\"." ((? inferior-package? pkg) (inferior-package-full-name pkg)))) -(define package-output (make-object-property)) +(define package-outputs (make-object-property)) + +(define (add-package-output! pkg out) + (let ((outs (package-outputs pkg))) + (set! (package-outputs pkg) + (if outs + (cons out outs) + (list out))))) (define bash-minimal (mlambda () diff --git a/gwl/processes.scm b/gwl/processes.scm index 2452d1f..3616ad2 100644 --- a/gwl/processes.scm +++ b/gwl/processes.scm @@ -45,6 +45,7 @@ process-name process-full-name process-version + process-raw-packages process-packages process-raw-inputs process-inputs @@ -182,7 +183,7 @@ #:init-keyword #:description #:init-value "") (packages - #:accessor process-packages + #:accessor process-raw-packages #:init-keyword #:packages #:init-value '() #:implicit-list? #t @@ -197,12 +198,21 @@ ((and (? string?) spec) (lookup-package spec)) ((and (? valid-package?) pkg) + (add-package-output! pkg "out") + pkg) + (((? valid-package? pkg) (? string? output)) + (add-package-output! pkg output) pkg) (x (raise (condition (&gwl-type-error - (expected-type (list "" "" "")) + (expected-type + (list "" + "" + "" + "( )" + "(inferior-package> )")) (actual-value x)))))) value))) (inputs @@ -622,6 +632,9 @@ the container." ;;; ADDITIONAL FUNCTIONS ;;; --------------------------------------------------------------------------- +(define (process-packages process) + (delete-duplicates (process-raw-packages process))) + (define* (process-inputs process #:optional with-tags?) "Return the plain values of all inputs of PROCESS, without any keyword tags if WITH-TAGS? is #FALSE or missing." @@ -688,10 +701,13 @@ PROCESS." (let* ((name (process-full-name process)) (packages (cons (bash-minimal) (process-packages process))) - (manifest (packages->manifest (map - (lambda (pkg) - (list pkg (package-output pkg))) - packages))) + (manifest (packages->manifest + (append-map + (lambda (pkg) + (map (lambda (output) + (list pkg output)) + (package-outputs pkg))) + packages))) (profile (profile (content manifest))) (search-paths (delete-duplicates (map search-path-specification->sexp --8<---------------cut here---------------end--------------->8--- -- Olivier Dion oldiob.dev