unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicholas von Klitzing <nicholas@nvk.pm>
To: "52107@debbugs.gnu.org" <52107@debbugs.gnu.org>
Subject: bug#52107: An Idea
Date: Fri, 26 Nov 2021 09:42:40 +0000	[thread overview]
Message-ID: <bAnL3dryeI2AAu7UgvC9z1EUfAXIclISdBbC8IWjGUcFHmEm_-xBlkSsb7QkTJIXKaq_qsofCOV71qbWS6CEBrPrVq-7jP3QRyfZTlmTatg=@nvk.pm> (raw)
In-Reply-To: <nMycyAkK9vDlP_F9nXTj8gNCytp8oNnd9jrH-eVQVEqio9_QFXsMapzpREfjGpaXN_1XM4fv9ZGwbhbc4FbGehxqotDWXfVRvTdhh3Aeh7o=@nvk.pm>

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`.

In the rust-analyzer package we could then copy a thing from `icedove-wayland`:

``
(arguments
      '(#:modules ((guix build utils))
        #:builder
        (begin
          (use-modules (guix build utils))
          (let* ((bash    (assoc-ref %build-inputs "bash"))
                 (icedove (assoc-ref %build-inputs "icedove"))
                 (out     (assoc-ref %outputs "out"))
                 (exe     (string-append out "/bin/icedove")))
            (mkdir-p (dirname exe))

            (call-with-output-file exe
              (lambda (port)
                (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.
 MOZ_ENABLE_WAYLAND=1 exec ~a $@"
                        (string-append bash "/bin/bash")
                        (string-append icedove "/bin/icedove"))))
...
              ((icedove) out))
            #t))))
``




  reply	other threads:[~2021-11-26  9:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 14:53 bug#52107: rust-analyzer shipped broken without rust-src Nicholas von Klitzing
2021-11-26  9:42 ` Nicholas von Klitzing [this message]
2021-11-26 14:21   ` bug#52107: An Idea Maxime Devos
2021-11-26 17:40     ` Nicholas von Klitzing
2021-11-26 18:07       ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='bAnL3dryeI2AAu7UgvC9z1EUfAXIclISdBbC8IWjGUcFHmEm_-xBlkSsb7QkTJIXKaq_qsofCOV71qbWS6CEBrPrVq-7jP3QRyfZTlmTatg=@nvk.pm' \
    --to=nicholas@nvk.pm \
    --cc=52107@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).