From c4cfab5e16d4302ce887318e81b9890f58256572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Wed, 4 Mar 2020 15:31:12 -0500 Subject: [PATCH] Make feature options available downstream to nu-cli subcrate. (#1450) --- Cargo.lock | 4 ++-- Cargo.toml | 8 ++++---- crates/nu-cli/Cargo.toml | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7678db655c..ebed1bd097 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2192,7 +2192,6 @@ name = "nu" version = "0.10.1" dependencies = [ "clap", - "clipboard", "crossterm 0.16.0", "ctrlc", "dunce", @@ -2226,7 +2225,6 @@ dependencies = [ "pretty_env_logger 0.4.0", "semver", "serde 1.0.104", - "starship", "syntect", "toml 0.5.6", "url", @@ -2258,6 +2256,7 @@ dependencies = [ "cfg-if", "chrono", "clap", + "clipboard", "csv", "ctrlc", "derive-new", @@ -2312,6 +2311,7 @@ dependencies = [ "serde_urlencoded", "serde_yaml", "shellexpand", + "starship", "strip-ansi-escapes", "tempfile", "term", diff --git a/Cargo.toml b/Cargo.toml index 04e4ec32d7..ee04c0e66b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,11 +40,9 @@ nu_plugin_textview = { version = "0.10.0", path = "./crates/nu_plugin_textview", nu_plugin_tree = { version = "0.10.0", path = "./crates/nu_plugin_tree", optional=true } nu-macros = { version = "0.10.0", path = "./crates/nu-macros" } -clipboard = { version = "0.5", optional = true } crossterm = { version = "0.16.0", optional = true } onig_sys = { version = "=69.1.0", optional = true } semver = { version = "0.9.0", optional = true } -starship = { version = "0.35.1", optional = true } syntect = { version = "3.2.0", optional = true } url = { version = "2.1.1", optional = true } @@ -69,7 +67,7 @@ nu-build = { version = "0.10.0", path = "./crates/nu-build" } test-bins = [] default = ["sys", "ps", "textview", "inc", "str"] -stable = ["default", "starship-prompt", "binaryview", "match", "tree", "average", "shuffle", "sum", "post", "fetch", "clipboard"] +stable = ["default", "starship-prompt", "binaryview", "match", "tree", "average", "shuffle", "sum", "post", "fetch", "clipboard-cli"] # Default textview = ["crossterm", "syntect", "onig_sys", "url", "nu_plugin_textview"] @@ -84,12 +82,14 @@ binaryview = ["nu_plugin_binaryview"] fetch = ["nu_plugin_fetch"] match = ["nu_plugin_match"] post = ["nu_plugin_post"] -starship-prompt = ["starship"] shuffle = ["nu_plugin_shuffle"] sum = ["nu_plugin_sum"] trace = ["nu-parser/trace"] tree = ["nu_plugin_tree"] +clipboard-cli = ["nu-cli/clipboard-cli"] +starship-prompt = ["nu-cli/starship-prompt"] + [[bin]] name = "fail" path = "crates/nu-test-support/src/bins/fail.rs" diff --git a/crates/nu-cli/Cargo.toml b/crates/nu-cli/Cargo.toml index 3c6ff93507..3e91c87d27 100644 --- a/crates/nu-cli/Cargo.toml +++ b/crates/nu-cli/Cargo.toml @@ -85,6 +85,9 @@ umask = "0.1" unicode-xid = "0.2.0" which = "3.1.0" +clipboard = { version = "0.5", optional = true } +starship = { version = "0.35.1", optional = true } + [target.'cfg(unix)'.dependencies] users = "0.9" @@ -97,3 +100,8 @@ pretty_assertions = "0.6.1" [build-dependencies] nu-build = { version = "0.10.0", path = "../nu-build" } + +[features] +stable = [] +starship-prompt = ["starship"] +clipboard-cli = ["clipboard"]