2019-10-11 19:13:00 +00:00
|
|
|
{ pkgs ? import <nixpkgs> {
|
|
|
|
overlays = [
|
|
|
|
(import (builtins.fetchTarball
|
|
|
|
"https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"))
|
|
|
|
];
|
|
|
|
} }:
|
|
|
|
with pkgs;
|
2019-10-10 19:23:12 +00:00
|
|
|
let
|
2019-10-11 17:06:24 +00:00
|
|
|
|
2019-10-11 19:13:00 +00:00
|
|
|
nightly = ((pkgs.rustChannelOf {
|
2019-10-11 17:06:24 +00:00
|
|
|
date = "2019-09-01";
|
|
|
|
channel = "nightly";
|
|
|
|
}).rust.override {
|
|
|
|
extensions = [
|
|
|
|
"clippy-preview"
|
2019-10-11 19:13:00 +00:00
|
|
|
"rls-preview"
|
2019-10-11 17:06:24 +00:00
|
|
|
"rust-analysis"
|
2019-10-11 19:13:00 +00:00
|
|
|
"rust-src"
|
2019-10-11 17:06:24 +00:00
|
|
|
"rustfmt-preview"
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2019-10-11 19:13:00 +00:00
|
|
|
nu-deps = [ openssl_1_1 pkg-config x11 python3 ];
|
|
|
|
|
|
|
|
rust = [ nightly rustracer cargo-watch ];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2019-10-10 19:23:12 +00:00
|
|
|
name = "nushell-rust";
|
2019-10-11 19:13:00 +00:00
|
|
|
buildInputs = nu-deps ++ rust;
|
2019-10-11 17:06:24 +00:00
|
|
|
RUST_SRC_PATH = "${nightly}/lib/rustlib/src/rust/src";
|
2019-10-11 19:13:00 +00:00
|
|
|
SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
|
2019-10-10 19:23:12 +00:00
|
|
|
}
|