GithubHelp home page GithubHelp logo

Comments (8)

bkchr avatar bkchr commented on May 27, 2024 1

Hi, here is my default.nix for rust with rust-src:

with import <nixpkgs> {}; 

let 
  myrust = (rustChannels.stable.rust.override { extensions = [ "rust-src" ]; });
in
stdenv.mkDerivation {
  name = "rust-dev";
  buildInputs = [ myrust rustracer ];
  RUST_SRC_PATH= "${myrust}/lib/rustlib/src";
}

And at least in emacs racer works with this path :)

from nixpkgs-mozilla.

steveej avatar steveej commented on May 27, 2024

@bkchr
Your expression almost works for me. I need to use RUST_SRC_PATH= "${myrust}/lib/rustlib/src/rust/src";. Otherwise racer doesn't find the sources, tested with $ racer complete "std::process". I'm wondering how it works for you, as I also can't find a recursive option or something alike on racer.

However, all there is to do is to document the extension attribute somehwere obvious 🤓

from nixpkgs-mozilla.

bkchr avatar bkchr commented on May 27, 2024

Yeah you are right, the path was wrong :/
Thx for that^^

Yeah, that should be documented ^^

from nixpkgs-mozilla.

steveej avatar steveej commented on May 27, 2024

@garbas @nbp Please assign this issue to me. I'll file a documentation PR eventually.

from nixpkgs-mozilla.

nbp avatar nbp commented on May 27, 2024

@steveej Thanks for your help.

from nixpkgs-mozilla.

fzakaria avatar fzakaria commented on May 27, 2024

I'm still using this PR as documentation :)

from nixpkgs-mozilla.

steveej avatar steveej commented on May 27, 2024

I'm still using this PR as documentation :)

@fzakaria I never came back to issue but now that I'm reminded of it I'm happy to follow up. What's the exact information in here that's helping you?

from nixpkgs-mozilla.

fzakaria avatar fzakaria commented on May 27, 2024

How to add RUST_SRC_PATH since my IDE was asking for the path.

I saw another pull request that the source was also added to every channel automatically without needing to specify the extension.

The two together would be a really good documentation addition.

from nixpkgs-mozilla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.