From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id OCKfM0FhAGdmpwAAqHPOHw:P1 (envelope-from ) for ; Fri, 04 Oct 2024 21:42:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OCKfM0FhAGdmpwAAqHPOHw (envelope-from ) for ; Fri, 04 Oct 2024 23:42:25 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=J8zJFj5h; 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=reject) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728078145; 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=kIwUExeRp6pMBIXF7DreeD5aOi7MwcvYVarUd6PJmXg=; b=A80ej1vVMfKOhl0oDg4BeXP5Umd/9whajZoMNyaZX6wB4J3XaMxO4rSq3hsazLr4iw9qYp HCcQ+YNZcO2+Hxj9I3wLTarNLpyPW9e3yrmVrIs6Y+WCok1p2Dn+Q5DMYcunLGRVSiZ+K1 r7vptmaXC75mrPdXNMD7noq6Q+BBBLXVWslUf0oTBizpqVDT6BqnlWl3G/HKtbGdkNxUdc jUSYbGSm633GAMfQH5rbMk2jemuyeQu8WWGfUTlPgPnOIcOyFauAMpsPlTMt8keL+rXHF2 3sPcaDFv+onxYE2HFa2GPGMpx4Wh8vhtDOLY8sSuI9wGmx9lRCidE4bS+8z4Gw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728078145; a=rsa-sha256; cv=none; b=r1AIa+k0Jf29z1sAClSIQwJu8ga1G+Urs750A6uuWOyHsg6e0D0WzAKJ4x91eninPvCnZf uHTDuCsgRAQiJiHFnXRyITxIEFWgMhbJ4jcV7W2VJPK14EncgUKU1AsM3Os7jYf6ALf/b/ 5mBWZc6s3SHfPkAeEwSh0WFu9YmyXdzvy8moyM+7eOSAQgEngvDEZNjlBc9b+DK1+sOqQS iRDZPpVUVFWeMcAeAyylupMcUIbQcikcgW/V5ai7SfaG4PqCxXmQfL4+VpIrWBsKuB5auK aBSWZhI69CmiV6T04RCjcnKrPQMT1H1Kyx+U5miFhelcpvGKkDvTrRj/XKzWnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=J8zJFj5h; 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=reject) header.from=disroot.org 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 588B37D905 for ; Fri, 04 Oct 2024 23:42:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swq40-0002gK-9M; Fri, 04 Oct 2024 17:42:16 -0400 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 1swWuO-00009A-EN for help-guix@gnu.org; Thu, 03 Oct 2024 21:15:04 -0400 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swWuM-0006Jy-Hf for help-guix@gnu.org; Thu, 03 Oct 2024 21:15:04 -0400 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id F090E23D29; Fri, 4 Oct 2024 03:14:58 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id lw8k63kfiyaw; Fri, 4 Oct 2024 03:14:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1728004498; bh=nteNdSFsX3uj6bn7SNJ700GKxJefVCkqr6F8xFcEYEs=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=J8zJFj5hY9rlGo06xNpv1+xznklltAqQj4cLLwN8RFlIRdeYDMDKyhLq7F6HjdVeW zVaPNx8xZC02GSVZxgFrgQ3lUQ5CqRezofzJLxLQnev+w5JCLsFHkJbwaI0X+V9KYg 24Cajd8sF2JlICXzbInsWrGjBFX59Wgopwlw9ml1vjTOn0VpQE6ie6JGKyBs2F+ytG oEMpGaEaCVBlIpzzff0KpwGDG7niR0RPUjkAXvCxvgBJt3X7p+DhtN8ZiDwaSUZ/Mn nS7s+oyJbLWpX4S0VWSsRzioCvLspL475IavHffuG3XJbXt7FCEG/zAzeZVTwmMt3p kSsf9s5QniBcg== From: James Smith To: Andreas Enge Cc: Aristide Doussot , help-guix@gnu.org Subject: Re: Add path to a guix package into CMakeLists.txt In-Reply-To: (Andreas Enge's message of "Thu, 3 Oct 2024 15:18:07 +0200") References: Date: Thu, 03 Oct 2024 18:12:23 -0700 Message-ID: <861q0w658o.fsf@disroot.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.21.23.139; envelope-from=jsubuntuxp@disroot.org; helo=layka.disroot.org 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 04 Oct 2024 17:42:15 -0400 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.83 X-Spam-Score: -4.83 X-Migadu-Queue-Id: 588B37D905 X-Migadu-Scanner: mx13.migadu.com X-TUID: WXy0WRYW3gs/ Andreas Enge writes: > this is indeed quite a common action. For instance, I do something like this > in the package vinci in gnu/packages/maths.scm: > > (modify-phases %standard-phases > (replace 'configure > ;; register the lrs location in the config file > (lambda* (#:key inputs #:allow-other-keys) > (let* ((lrs (assoc-ref inputs "lrslib")) > (lrsexec (string-append lrs "/bin/lrs"))) > (substitute* "vinci.h" > (("#define LRS_EXEC \"lrs\"") > (string-append "#define LRS_EXEC \"" lrsexec "\"")))) > #t)) > > So the function defining the phase needs to take the keyword parameter > "inputs", and this is set to the inputs of the package. > Then (assoc-ref inputs "lrslib") resolves to /gnu/store/...-lrslib-..., > the store path corresponding to the input package. > > However, this is an "old style" package; for instance, phases do not end > with #t anymore. I do not know whether one would do differently with the > modern gexp style approach. In case you're wondering, the example above when rewritten in the current style would look something like this: #~(modify-phases %standard-phases (replace 'configure ;; Register the lrs location in the config file. (lambda* (#:key inputs #:allow-other-keys) (substitute* "vinci.h" (("#define LRS_EXEC \"lrs\"") (string-append "#define LRS_EXEC \"" (search-input-file inputs "/bin/lrs") "\"")))))) Hope that helps, James