From f0ca0312f3ef0061033c888b56de2a64fa530365 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 11 Oct 2019 19:06:24 +0200 Subject: [PATCH] Adds racer, formats shell.nix --- shell.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/shell.nix b/shell.nix index e6062b2cb0..2b2bbca078 100644 --- a/shell.nix +++ b/shell.nix @@ -1,10 +1,25 @@ let - moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); + moz_overlay = import (builtins.fetchTarball + "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"); + nixpkgs = import { overlays = [ moz_overlay ]; }; - nightly = ((nixpkgs.rustChannelOf { date = "2019-09-01"; channel = "nightly"; }).rust.override { extensions = [ "rust-src" "rls-preview" "clippy-preview" "rust-analysis" "rustfmt-preview" ];}); -in -with nixpkgs; + + nightly = ((nixpkgs.rustChannelOf { + date = "2019-09-01"; + channel = "nightly"; + }).rust.override { + extensions = [ + "rust-src" + "rls-preview" + "clippy-preview" + "rust-analysis" + "rustfmt-preview" + ]; + }); + +in with nixpkgs; stdenv.mkDerivation { name = "nushell-rust"; - buildInputs = [ nightly openssl_1_1 pkg-config ]; + buildInputs = [ nightly openssl_1_1 pkg-config rustracer ]; + RUST_SRC_PATH = "${nightly}/lib/rustlib/src/rust/src"; }