GNU bug report logs - #52107
rust-analyzer shipped broken without rust-src

Previous Next

Package: guix;

Reported by: Nicholas von Klitzing <nicholas <at> nvk.pm>

Date: Thu, 25 Nov 2021 14:54:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Nicholas von Klitzing <nicholas <at> nvk.pm>
To: "52107 <at> debbugs.gnu.org" <52107 <at> debbugs.gnu.org>
Subject: bug#52107: An Idea
Date: Fri, 26 Nov 2021 09:42:40 +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`.

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




This bug report was last modified 3 years and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.