diff --git a/shell.nix b/shell.nix index 2b2bbca07..9e7cbe972 100644 --- a/shell.nix +++ b/shell.nix @@ -1,25 +1,32 @@ +{ pkgs ? import { + overlays = [ + (import (builtins.fetchTarball + "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz")) + ]; +} }: +with pkgs; let - moz_overlay = import (builtins.fetchTarball - "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"); - nixpkgs = import { overlays = [ moz_overlay ]; }; - - nightly = ((nixpkgs.rustChannelOf { + nightly = ((pkgs.rustChannelOf { date = "2019-09-01"; channel = "nightly"; }).rust.override { extensions = [ - "rust-src" - "rls-preview" "clippy-preview" + "rls-preview" "rust-analysis" + "rust-src" "rustfmt-preview" ]; }); -in with nixpkgs; -stdenv.mkDerivation { + nu-deps = [ openssl_1_1 pkg-config x11 python3 ]; + + rust = [ nightly rustracer cargo-watch ]; + +in stdenv.mkDerivation { name = "nushell-rust"; - buildInputs = [ nightly openssl_1_1 pkg-config rustracer ]; + buildInputs = nu-deps ++ rust; RUST_SRC_PATH = "${nightly}/lib/rustlib/src/rust/src"; + SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt"; }