From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6OGxBj/Al2Ob7wAAbAwnHQ (envelope-from ) for ; Tue, 13 Dec 2022 00:58:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8P26Bj/Al2PWVAAA9RJhRA (envelope-from ) for ; Tue, 13 Dec 2022 00:58:55 +0100 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 9E1BFC017 for ; Tue, 13 Dec 2022 00:58:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4sgm-0001qz-QN; Mon, 12 Dec 2022 18:58:28 -0500 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 1p4sgi-0001nZ-PO for help-guix@gnu.org; Mon, 12 Dec 2022 18:58:25 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4sgg-0007WN-Io for help-guix@gnu.org; Mon, 12 Dec 2022 18:58:24 -0500 Received: by mail-ej1-x636.google.com with SMTP id bj12so32444390ejb.13 for ; Mon, 12 Dec 2022 15:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZqCQTxo/mA+lm81DAmV+xivYQF9lQmTH3z8OFBdP770=; b=lY0qsT9IkWGm3Ad8i9NbwziDDf32d6k+8qhku2GP7SzMm8d8u2+2uGpcBTKzYjGug/ SEHS/PVNcVqjHDIZJfXxFxo5sX8bOIVEMj2MQ1jmFFQLoCgOatyaM3so75c1T9M3fdt0 IiwHTH/BX91syq81Zv1DHnY6gGgfDPVgLGgvm0xJ8zqfs+WOGut8uIo6QcOUcg7M3OnI nZAfpBo8ZMHl1ze1PuNciV/p2VRLzeHIoPnBOWOsgVF2b1af/SWCRgNm8kdBpG7dtgBC iEj6PGUBqYJT0/nnCy3akW7DapbyDJIpZH7qFwotAEC8YNuigwzBsSmD0GWGFFSci5SP PwiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZqCQTxo/mA+lm81DAmV+xivYQF9lQmTH3z8OFBdP770=; b=DqO1WmajYGSixMP6tIjN6qH41/D3R5UQnyYZh/edHjBmPTj+npKmJBdYHV7oIKhTMy gj6ZOvlRjfEc7dVxgcsE12vy3JRqNVawsmJvk15RFy6b+jycPXBPFZ09TVcUjVLch4N8 Y0ANI1dKyVbtdTYgJjRHFgSm7cYKII9+VTkz9KQLhinX41deXv55/kHiXOmjeaiJHrZn fK0LxfVQHLRLnw1ZrvnCKrFA7rJuebqGfsmY3te5Df+IQJ6fq1T+rvCNhie+uZTQ6Brb g/mPi0yEePfo34H6yNuymSJAOOyHozlCAZKHa6LMyr3o6U9J5i4R1DJjczQQ/IlHOHUh xUsw== X-Gm-Message-State: ANoB5pmfSG1KkOAR/M+0ELDhcLU1ASpslVYo3MkdZblGhglwau4odv5C olv66e1x//KwKVP9Ge7W/WqgrIQ6dYXrIlG9RdU= X-Google-Smtp-Source: AA0mqf7Fub/FEGGV6UECOMO28/BnoWyayMgaZuLOEWa0m0MNIau3uQq/iAlCVHR/Lj9Oj9ghkXQrEFJuXcuuTGGzY6E= X-Received: by 2002:a17:906:99d6:b0:7c0:c91c:5d38 with SMTP id s22-20020a17090699d600b007c0c91c5d38mr21146763ejn.50.1670889500508; Mon, 12 Dec 2022 15:58:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "dabbede@gmail.com" Date: Tue, 13 Dec 2022 00:58:09 +0100 Message-ID: Subject: Re: Creating a package using two sources/origins To: "(" Cc: help-guix@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=dabbede@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670889534; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZqCQTxo/mA+lm81DAmV+xivYQF9lQmTH3z8OFBdP770=; b=eAXrzHbxjnUsYFPoHxIJ8LI1ozpttGS4xmfJr8nL/n3/JxtNj65Ab5DTlPAkmTFjmD7clT /deo6x+voHmbE04vZggO/cO9BYTd21Sm6hm9+cwLlQef1Wee5zpKHRoy83NFmAdZkBAVtb nuZ+vCnDtej+wP5T7/M4hBkC+EKaHiw4UMFbvwRIBB5/zAoA30Jj6SlXqrEcsMWXDGLTml eZN2nsbYM460LudfEQ8wJjJ7XIXp4FORPlxY+uR6TKzeoC+qZhf4C5y6R5IjBI9G32GKrm RDh4d4JpCtKAo4Z37tZzBkU76fa1L3TrHP0Qx35RgLjdJv/QkymxiBrIUzZ16w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=lY0qsT9I; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670889534; a=rsa-sha256; cv=none; b=R8YBBKuvArMWFbfP3J+cm30h+dMhz0aePtAny+fwuY1X7ZvoBYydP87Xnm3+zP7ejZx33u /drGJYwT1/jDQ7cPpOT3a1XPg3iVJDLzbtfu4Lhx9i5K7c4qSntTFPi7B9A/4isovIHzVb 5Vnn0wA/yepUB5xc/yiCaBZuXv97Mwp93Mg7DYKTtiXIMrMbISFopARl2IYvEGFj+r6ul9 yD+TGJNublgt6Tz2u4JBiVfo1l3P4bMOv64yI8oz4CNGSMWH6OYvsY+03K/C1qGrLsy17B LacB2On3Lh9tP9UNgyumoF2DX2Ter1FwroDPtyZtLAcpVoJFulIvo/s2k70vvg== X-Migadu-Spam-Score: -6.42 X-Spam-Score: -6.42 X-Migadu-Queue-Id: 9E1BFC017 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=lY0qsT9I; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-TUID: 56ojvIrhPcIm Hi ( as you see I'm not yet practical with G-exp and I still have to understand where exactly they are useful or not. On Mon, Dec 12, 2022 at 11:43 PM ( wrote: > > Heya, > > What you need to do is combine ORIGIN with UNGEXP-NATIVE: > > #~(modify-phases %standard-phases > (add-after 'unpack 'unpack-extra-sources > (lambda _ > (copy-recursively #+(origin ...) > "extra-source-directory")))) > > When the build script implementing the phases is... built, this lambda will look > like this: > > (lambda _ > (copy-recursively "/gnu/store/...-extra-sources" > "extra-source-directory")) > > Roughly, the UNGEXP-NATIVE compiles the origin directory for the host > architecture, then substitutes itself for a string containing the output path of > the compiled store item. > > -- ( This is a short extract of my custom .scm file: (define xenomai-version "3.1") (define xenomai-origin (origin (method url-fetch) (uri (string-append "https://xenomai.org/downloads/xenomai/stable/xenomai-" xenomai-version ".tar.bz2")) (sha256 (base32 "1064l80p9fdbp553mrbin4s7f5qhnwifhfds8a9wl6p6s10alsb4")))) (define-public my-help (package (inherit hello) (name "my-help") (arguments #~(modify-phases %standard-phases (add-after 'unpack 'unpack-extra-sources (lambda _ (copy-recursively #+xenomai-origin "extra-source-directory"))))))) First of all, I'm not sure whether the gexp that you suggested is placed correctly within the "arguments" field of the package. Second, if I try to build the above my-help package I get an exception with this backtrace: pcp@PCP3600 ~/guix [env]$ ./pre-inst-env guix build --keep-failed my-help Backtrace: In ice-9/boot-9.scm: 1747:15 19 (with-exception-handler # ?) 1752:10 18 (with-exception-handler _ _ #:unwind? _ # _) In guix/ui.scm: 449:6 17 (_) In guix/scripts/build.scm: 714:5 16 (_) In srfi/srfi-1.scm: 673:15 15 (append-map # ?) 586:17 14 (map1 ("x86_64-linux")) In guix/scripts/build.scm: 716:21 13 (_ _) In guix/store.scm: 1382:11 12 (map/accumulate-builds # ?) 1300:8 11 (call-with-build-handler # ?) In guix/scripts/build.scm: 670:16 10 (_ #) 659:24 9 (_ # ?) In guix/packages.scm: 1317:17 8 (supported-package? # ?) In guix/memoization.scm: 101:0 7 (_ # # ?) In guix/packages.scm: 1295:37 6 (_) 1555:16 5 (package->bag _ _ _ #:graft? _) 1652:22 4 (thunk) In unknown file: 3 (_ "my-help-2.12.1" #:system "x86_64-linux" #:source # # ?) In ice-9/boot-9.scm: 1685:16 2 (raise-exception _ #:continuable? _) 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure apply: Apply to non-list: # () 7f52ce4af960>:out> "extra-source-directory")))) /home/pcp/guix/gnu/packages/dabbede.scm:31:6 7f52cc88c9c0> Finally, if not too much out of scope, can you explain me why the #+ ungexp can accept an origin object instead of a package? I assumed from the documentation that gexp where used only to reference among derivation of packages. Regards