From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id APKcAsLYq2GChgEAgWs5BA (envelope-from ) for ; Sat, 04 Dec 2021 22:08:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2ODGOcHYq2HaAgAAbx9fmQ (envelope-from ) for ; Sat, 04 Dec 2021 21:08:17 +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 75059BC98 for ; Sat, 4 Dec 2021 22:08:14 +0100 (CET) Received: from localhost ([::1]:49542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtcGT-000725-Ls for larch@yhetil.org; Sat, 04 Dec 2021 16:08:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtcGJ-0006vg-7U; Sat, 04 Dec 2021 16:08:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtcGI-0007d5-VY; Sat, 04 Dec 2021 16:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtcGI-0006IP-Jl; Sat, 04 Dec 2021 16:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52284: Partially unifying packages and inferior packages Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-devel@gnu.org, bug-guix@gnu.org Resent-Date: Sat, 04 Dec 2021 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52284 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 52284@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org X-Debbugs-Original-Xcc: guix-devel@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163865203924150 (code B ref -1); Sat, 04 Dec 2021 21:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Dec 2021 21:07:19 +0000 Received: from localhost ([127.0.0.1]:55292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtcFa-0006HS-JC for submit@debbugs.gnu.org; Sat, 04 Dec 2021 16:07:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:49946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtcFY-0006HJ-CE for submit@debbugs.gnu.org; Sat, 04 Dec 2021 16:07:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtcFY-00067Q-7o for bug-guix@gnu.org; Sat, 04 Dec 2021 16:07:16 -0500 Received: from newton.telenet-ops.be ([195.130.132.45]:58988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtcFV-0007U0-Op for bug-guix@gnu.org; Sat, 04 Dec 2021 16:07:15 -0500 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by newton.telenet-ops.be (Postfix) with ESMTPS id 4J62Dp1D2YzMqYmY for ; Sat, 4 Dec 2021 22:01:46 +0100 (CET) Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id SM1i2600F4UW6Th06M1ikN; Sat, 04 Dec 2021 22:01:42 +0100 Message-ID: From: Maxime Devos Date: Sat, 04 Dec 2021 21:01:42 +0000 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1638651702; bh=Rfdw0ZwltWpuljhWZB82Ug3FgqgBaqQq7mEhiEInSek=; h=Subject:From:To:Date; b=djNa66kVHHC356LqQnaxbj8SIHFD8C4WH31SIb1Pgq1nspKLvc/8GrC45XH366CYC 14a6CdhmH3BeLTI1hkKuUyBygl9oiNmuZmMStJcZi+tjZCgTWybSqkkzivhHmVOGnT R9WUtPWE7mjxPpBOgV/S2sz8CphKdHbWoQlS8i8vCqS1SFcGiBVOcVZVQeJERBnZGo cAsB7kOMyQ35T5cS2pn95opErbWbV2QmS8IachTMdFiR14QTsXJdByxxFOn0bhWfd2 wzXMrn9TSFA7+wptVL99Feb73aRj1oB2YiLaqVAEbULmPncJS5EG2s29mHwvgHvPGp IUzjcyrvSqw+w== Received-SPF: pass client-ip=195.130.132.45; envelope-from=maximedevos@telenet.be; helo=newton.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1638652094; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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:dkim-signature; bh=Rfdw0ZwltWpuljhWZB82Ug3FgqgBaqQq7mEhiEInSek=; b=B7ZmvBkHUhc6K6t0oDgmjeEIiVBt12goYbgOBeNFqTHV5QbHI5RBSUTPo5P0LaMlIz1DMM yit9Z10jt3pa6vWPGSg9iCFKrRQn6ENKEIOKEHhPl0NnnTyWlfNJK1r0LSIJZ3fYVADfhk utyIMiUyzvmkqm+zZ8iD9sf1SPuqB7lvFEnBax0c7POiKhHUE3zaNxSGbI4mIVeszOQcGg xYridLucKQooIWfuFSw6RWSzC2wScYpnErr32pdZ1HrBigReLY5WQp4pXXEcqNP2634oj+ vVCnfyrPAi+TbWNZ8rQndgNhLeUR/gM3EMRXMaAOmEbNsji+5Uvcy6j1ohagag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638652094; a=rsa-sha256; cv=none; b=Qy3GNiGqciKnGmTWDkPo4yFxiQ7U/AV+dOIC7+LSUURHcVRVEZKWgOSTsuBoVqbAnFWbyX kxNfEHmMad5RMx3dJtDPhddp/4xTtiH07cSnONehb8VREypeKaAsFpfDfTMcgbDU08NKjw wbqZOMFnrQtwwljrscqFGhIMwoM4J6mOi3mGKA+QjsU8XN6UFDps4JQz+IBhPBDNrPc+ou KVR2crvBrkAF4pUfiXWJ1oMhm+/QnbEdJJyQ182OcToqseFfqyEigFGuEeL/Uujph4JO4h 3Ux5akY8SxjrgTRHX81a65xtIuI0nhGnp9WgYVcEFi9p9E0KbmSfTYdQS8AAbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=djNa66kV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=djNa66kV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 75059BC98 X-Spam-Score: -2.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: +3jWhGwDcZhd X-Debbugs-CC: guix-devel@gnu.org Hi guix, There have been some bug reports with as root cause that inferior packages aren't packages. I think that root cause is a bug. To resolve this, there was some talk on using GOOP classes, or define-gexp-compiler-style polymorphism for package-native-inputs etc., but these come with a complexity and time cost. At the end of this e-mail, there is some untested code for turning an inferior package into an equivalent package. If it's properly integrated into (guix inferior), we could mostly do away with the inferior-package?/package? distinction, by letting lookup-inferior-package and the like return ‘proper’ packages, albeit with a weird build system and ignoring inheritance. To be clear, I won't be working on this, but the idea seemed to nice to not send it. Greetings, Maxime (define inferior-package-build-system (build-system (name 'inferior) (description "Build things via an inferior") (lower lower))) (define* (lower name #:key inferior-package system target #:allow-other-keys) (bag ;; TODO(?): package transformations using bags won't work! (name name) ; ignored (system system) ; ignored (target target) ; ignored (arguments '()) ; ignored (build (lambda _ (inferior-package->derivation inferior-package system #:target target))))) (define (inferior-inputs->inputs inferior-inputs) (map (match-lamda ((label inf . rest) `(,label ,(inferior-package->package inf) ,@rest))) inferior-inputs)) (define (inferior-package->package inf) ;; TODO: somehow make sure no inheritance happens on this package (package (name (inferior-package-name inf)) (version (inferior-package-version inf)) (replacement (and=> (inferior-package-replacement inf) inferior-package->package)) (source #f) ; TODO (build-system inferior-package-build-system) (arguments `(#:inferior-package ,inf)) (synopsis (inferior-package-synopsis inf))   (description (inferior-package-description inf)) (home-page (inferior-package-home-page inf)) (location (inferior-package-location inf)) (inputs (map inferior-inputs->inputs (inferior-package-inputs inf))) (native-inputs (map inferior-inputs->inputs (inferior-package-native-inputs inf))) (propagated-inputs (map inferior-inputs->inputs (inferior-package-propagated-inputs inf))) (transitive-propagated-inputs (map inferior-inputs->inputs (inferior-package-transitive-propagated-inputs inf))) (native-search-paths (propagated-package-native-search-paths inf)) (search-paths (propagated-package-search-paths inf)) (license #f)) ; TODO