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 OLS+DjgcoWGz1wAAgWs5BA (envelope-from ) for ; Fri, 26 Nov 2021 18:41:12 +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 qH5RCjgcoWGeUQAAbx9fmQ (envelope-from ) for ; Fri, 26 Nov 2021 17:41:12 +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 F29D5141C4 for ; Fri, 26 Nov 2021 18:41:11 +0100 (CET) Received: from localhost ([::1]:47008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqfDh-00069x-Um for larch@yhetil.org; Fri, 26 Nov 2021 12:41:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqfDa-00069o-5e for bug-guix@gnu.org; Fri, 26 Nov 2021 12:41:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqfDZ-0003ja-TV for bug-guix@gnu.org; Fri, 26 Nov 2021 12:41:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mqfDZ-0006fX-LX for bug-guix@gnu.org; Fri, 26 Nov 2021 12:41:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52107: An Idea Resent-From: Nicholas von Klitzing Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 26 Nov 2021 17:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52107 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Received: via spool by 52107-submit@debbugs.gnu.org id=B52107.163794842325571 (code B ref 52107); Fri, 26 Nov 2021 17:41:01 +0000 Received: (at 52107) by debbugs.gnu.org; 26 Nov 2021 17:40:23 +0000 Received: from localhost ([127.0.0.1]:60529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqfCw-0006eN-Oy for submit@debbugs.gnu.org; Fri, 26 Nov 2021 12:40:23 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:20757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqfCs-0006e6-QI for 52107@debbugs.gnu.org; Fri, 26 Nov 2021 12:40:21 -0500 Date: Fri, 26 Nov 2021 17:40:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvk.pm; s=protonmail3; t=1637948411; bh=QCCdsKkaEFlgUgKsZCthSpdzIoOZPjvZJqiZH32Hmls=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=vxoZ4ueQ3u2O2FtX+l2hQhCPJSuEzgTm6nIQja1aGhlyAzblN7i+f4VGT0GR9gZtz 8ECw5HpkOtjX3n6v58+u4r81PH5VAqGTpoWlJrqCmgYdlggy5D1eyd5DtLenoqZATz DI0wOH2bhcqFdt0VIqKqpY5KpkfkxqJUGT31r4qsLZM06DzfoLLd57HRxwtW7EoTus wb07lCvrB88pjNPt2KvdSBSNyKpn+Q4WgrGZRitz7kVRsU/asN2RMLI3mtizKPDMlq ydNOTWgqvYjVoHrELC98IkQ7MCAY5B8l7HGl/V3VKEUARvViwlQeT8b8ZAFSN/++7S osrGAEiQVh3Gg== From: Nicholas von Klitzing Message-ID: In-Reply-To: <7e36114357dd0ccd37490ed3b422364c709d60a3.camel@telenet.be> References: <7e36114357dd0ccd37490ed3b422364c709d60a3.camel@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Reply-To: Nicholas von Klitzing Cc: "52107@debbugs.gnu.org" <52107@debbugs.gnu.org> Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637948472; h=from:from:sender:sender:reply-to: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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QCCdsKkaEFlgUgKsZCthSpdzIoOZPjvZJqiZH32Hmls=; b=cGP0bA/LrHNmHl0lk9Ac1k4+uzdR6vanUKyi+JGyOUTsSWdDRjH1GrxQDaN5lP1IG8waeb 5n8okOEMTnae47tHftTucCAJ6Rl+Mp8KIulP7k/a2gVKc7gGg31KdX1N3UxwLCG/q0NZs7 7dFCfOTr3XOL2czKgTYAuqs/gwiGOtz0oJIJXyAxkcdx5BztIsGF9Rhph4vQmFkx+5+N9e h0lnUDBlVACvDn5oRtVQbXYAZAWTHWswo4x3X0HA/47YZEp13UoKF+m4hjUeke5/oH4h4U Fa1Sae4RhzGBxtwqNAaU+JhzWGSwiEwL0R+yqIUDj0nDdb0S/1o4j+/ZzDvl1w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637948472; a=rsa-sha256; cv=none; b=lHxWnpk1GvgQpkZ1FCbSM3iG02xrEOEytS/O8rzIgKx/+9G7FOprAOQRBYwdOcJ5QUxR0x 8wuqtpu4/KP8fTf6tcCLfUX0VSCXr+0IZNKKPiYb/DA7IPb0dl0XynOWSDuk5QUoPQ/CMI TrHNE08s2GocBnWOTkf8Rc9zaX2Ql5HxNtAtO4QbByLyUrW0+JYeGAghRhHdXV9N8r6Qhp MLif0Yn9lZPs6+WR/qdfiAAGX6g6tuhLax2oxvgKzlelyRdI8+I+VjzOLQ78lEwapFoQjK JTTM3dfI+/XBFJZecQlhmmrp182IN/TkaKF0H4W0sMRepFopaB6y7kZYJr6evQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nvk.pm header.s=protonmail3 header.b=vxoZ4ueQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=nvk.pm (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.80 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nvk.pm header.s=protonmail3 header.b=vxoZ4ueQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=nvk.pm (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: F29D5141C4 X-Spam-Score: -1.80 X-Migadu-Scanner: scn1.migadu.com X-TUID: /f8nXFsjRWsA That's definitely a much better solution. I'm having trouble finding documentation about both native-search-paths and= wrap-program, so let me know if I understand your suggestions and how to a= pply them correctly. The rust-1.18 package has a native-search-paths declaration: `` (native-search-paths (list (search-path-specification (variable "C_INCLUDE_PATH") (files '("include"))) (search-path-specification (variable "CPLUS_INCLUDE_PATH") (files '("include/c++" "include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))) ;; Do you mean add something along the lines of ;; this to every rust-xx package? (search-path-specification (variable "RUST_SRC_PATH") (files '("library"))))) ;; I'm not sure what arguments this tak= es `` The directory structure of the rust repository, changes over time, so the p= aths would need to be adjusted depending on the version. Would I also need = to add an additional build step to copy over the source and register it as = an output? And for the rust-analyzer package we then add something along the lines of? `` (add-after 'install 'wrap-rust-analyzer (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (rust-src-path (getenv "RUST_SRC_PATH"))) (wrap-program (string-append out "/bin/rust-analyzer") `("RUST_SRC_PATH" ":" prefix (,rust-src-path)))) #t)) `` I'd appreciate your feedback, since I'm mostly clueless :) Kind regards, Nicholas =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Friday, November 26th, 2021 at 2:21 PM, Maxime Devos wrote: > Nicholas von Klitzing schreef op vr 26-11-2021 om 09:42 [+0000]: > > > Just to get the ball rolling, here is a possible idea. > > > > It might makes sense to add an additional output to the rust package > > > > `src` and then require this by the rust-analyzer package as > > > > `rust:src`. > > I'd use a native-search-path instead of a wrapper setting the > > environment variable, such that rust-analyzer can be used with any > > version of rust and the user can override the source code used. > > > In the rust-analyzer package we could then copy a thing from > > > > `icedove-wayland`: > > > > [ > > > > =C2=A0...]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 (call-with-output-file exe > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (lambda (port) > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (format port "#!~a > > > > ;; This style of overriding environment variables could be used for > > > > ;; RUST_SRC_PATH, although I am not sure if this is the idiomatic > > > > ;; way to do it. > > > > =C2=A0MOZ_ENABLE_WAYLAND=3D1 exec ~a $@" > > 'wrap-program' could be used here, instead of manually making shell > > scripts. > > Greetings, > > Maxime