From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AG4/KvAUqmOiDgEAbAwnHQ (envelope-from ) for ; Mon, 26 Dec 2022 22:41:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gOdKKvAUqmP6NgAA9RJhRA (envelope-from ) for ; Mon, 26 Dec 2022 22:41:04 +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 3228819178 for ; Mon, 26 Dec 2022 22:41:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9vD6-0002TT-Vy; Mon, 26 Dec 2022 16:40:41 -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 1p9vD3-0002T3-Of for help-guix@gnu.org; Mon, 26 Dec 2022 16:40:37 -0500 Received: from sender4-op-o10.zoho.com ([136.143.188.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9vD1-0005tc-NR for help-guix@gnu.org; Mon, 26 Dec 2022 16:40:37 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1672090828; cv=none; d=zohomail.com; s=zohoarc; b=neJ8WyEa8xn1Y8SXbSmx1lpU8Md1figxmSRspU5SXh/lHvGXynpuCXjZoIzDF/dVKC1arvsQ/dJrJIZ0Pt/y1fvmVj54ib4pJ+dp6slAwfmCcK++Kctge9nDMbfpGFgT+wY+wvXxUUrTVXLAlRiof1F8Hnmk6xe7MHaHLjhuZ+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672090828; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=IWh8OTnGTCKU20yvbk/ZccpaoDJW0XJPCewp+Mt3kN0=; b=FPNewLxins96lv/k5Dp/+JC1WFCM3Zav4zSFryySHESPSytiFzK1ZHaSX2j1pxNtDrQZaw4gnOEGDqPuQM9q39jK57/mR8kb4HVkCujXh1oTXCkpPZCms1JpkLGs4aWZ2hn8OwXRx4ZeGm5Atziw4q7vPI55TWCHZw8eIe2Wjuo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=rdklein.fr; spf=pass smtp.mailfrom=edou@rdklein.fr; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1672090828; s=zoho; d=rdklein.fr; i=edou@rdklein.fr; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=IWh8OTnGTCKU20yvbk/ZccpaoDJW0XJPCewp+Mt3kN0=; b=TPgUfFeSaDfYPAChSQqLEFpPDZf6Yaa/XsaThwoKmp+24LVoGmBjfjcKVTJ6PoCO LCSMfivaLLLsWNV94bupqNAuH6XgCiEbe5FTAL3PBY+Ov3zSPEp+cTKFEaehp4sr2wQ npCa6jQOzIqjFF2S8mxMi0pHw9QvDrvDTqliwdg8= Received: from venerable (54.15.23.93.rev.sfr.net [93.23.15.54]) by mx.zohomail.com with SMTPS id 1672090825865460.722132609837; Mon, 26 Dec 2022 13:40:25 -0800 (PST) References: User-agent: mu4e 1.8.9; emacs 28.2 From: Edouard Klein To: phodina Cc: help-guix@gnu.org Subject: Re: Sourcing a script in phases Date: Mon, 26 Dec 2022 22:37:52 +0100 In-reply-to: Message-ID: <878ritvo75.fsf@rdklein.fr> MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.10; envelope-from=edou@rdklein.fr; helo=sender4-op-o10.zoho.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-Seal: i=2; s=key1; d=yhetil.org; t=1672090864; a=rsa-sha256; cv=pass; b=K93GpkQ+/Bzczc96p15sihSc1+jQQ1g8wdEF5rvqiRtIqbKyePCHaz3sGum2gm6Td2jnYu hzft6iFl3RHthWKivqifKE248BQyBePwf26O4PNpiyPC3zda1PBmtg3cur98NJ8dGc2e94 /7GGfPLyAUPE62ODES9F4wCTEQLW9IrEpKX5B9XL0ucLNeLxjczh6uOgNWKUaNKg7jFoNM UcNZaB+lFRbc6pwb/BSTMROCNmQk36P9sOgbnvUer0DwYfnSOLukseWEQre1PJRjBmbezH Jzhmuo95mbCDHROFG71Kq/WTekxn1kTkIk5xCFe4iJUHyDQLrcboYVGFi24KbA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=rdklein.fr header.s=zoho header.b=TPgUfFeS; 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=none; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672090864; 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=IWh8OTnGTCKU20yvbk/ZccpaoDJW0XJPCewp+Mt3kN0=; b=D+JY6aEilP1PIVFajVDEjhWod0ngiDj4VW4SrP3WC0jN+GA8PR+v+vGcSUma14bRka5xoh 6/NDgfMYCST1/eMqUW4oXhha6qbNu7RYpaByDLhQcu6g8VCQ8ApeZOdEqYqMj3nNb67Yti Mp03PDSN10DsaSIytf9MN5eRel990xmmDrRb/131teNv0VPZkVneQMW7llYpMCnGnNraGv ubYLjM5PKd0fx61Xmu6iUvIpQe3NmZ7mq3ZtmHFvb5E0RRUKrLUiq6P8tcVXQS59KnOXo7 gp/3XrrrnIlmt6+GMbQfreHfpYWNa/8TvjH/8OfRYBb+Xo7PNxkzWuV1E2B9Rw== X-Spam-Score: -4.83 X-Migadu-Queue-Id: 3228819178 Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=rdklein.fr header.s=zoho header.b=TPgUfFeS; 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=none; arc=pass ("zohomail.com:s=zohoarc:i=1") X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.83 X-TUID: jd3RB6fgeyCm Hi, It's probably not the right answer, but for lack of time to find the actual solution when I faced the same problem as you, here is what I did: https://gitlab.com/edouardklein/guix/-/blob/beaverlabs/beaver/packages/python-xyz.scm#L191 #+begin_src scheme #:builder (begin (use-modules (guix build utils)) (let* ((bash (assoc-ref %build-inputs "bash")) (requisomatic (assoc-ref %build-inputs "requisomatic")) (dir (string-append (assoc-ref %outputs "out") "/bin")) (fname (string-append dir "/requisomatic-server"))) (mkdir-p dir) (with-output-to-file fname (lambda _ (display (string-append "#!" bash "/bin/bash\n")) (display "source /run/current-system/profile/etc/profile\n") (display "REQUISOMATIC_DB_FILE=$1 gunicorn --bind=$2 --pid=$3 requisomatic:app\n"))) (chmod fname #o755) #t)))) #+end_src Basically this creates a shell script that sources whatever you want to source, and then call the executable you want to call. This is not exactly what you want to do, but you can use this technique to create a script that will run the build commands you want to run, and then call it during the build phase. Again, this is probably not the right answer. Cheers, Edouard. phodina via writes: > Hi, > > is there a way to source a script in the phases? > I tried to do: > > (invoke "source" "env.sh") > or > (invoke "." "env.sh") > > But it didn't work since they are builtin in the shell. > > ---- > Petr