From 7940420063924296a0061a69994c572fc8d147a5 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 26 Mar 2024 04:20:00 +0000 Subject: [PATCH 1/2] tokio-console: 0.1.9 -> 0.1.10 Diff: https://github.com/tokio-rs/console/compare/tokio-console-v0.1.9...tokio-console-v0.1.10 --- .../tools/tokio-console/cargo-lock.patch | 13 ------------- pkgs/development/tools/tokio-console/default.nix | 8 +++----- 2 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 pkgs/development/tools/tokio-console/cargo-lock.patch diff --git a/pkgs/development/tools/tokio-console/cargo-lock.patch b/pkgs/development/tools/tokio-console/cargo-lock.patch deleted file mode 100644 index 224a4acc082b..000000000000 --- a/pkgs/development/tools/tokio-console/cargo-lock.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock -index fcbe50c..27d4c30 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -1390,7 +1390,7 @@ dependencies = [ - - [[package]] - name = "tokio-console" --version = "0.1.8" -+version = "0.1.9" - dependencies = [ - "atty", - "clap", diff --git a/pkgs/development/tools/tokio-console/default.nix b/pkgs/development/tools/tokio-console/default.nix index 558934fd15ff..7d65f382f957 100644 --- a/pkgs/development/tools/tokio-console/default.nix +++ b/pkgs/development/tools/tokio-console/default.nix @@ -6,21 +6,19 @@ rustPlatform.buildRustPackage rec { pname = "tokio-console"; - version = "0.1.9"; + version = "0.1.10"; src = fetchFromGitHub { owner = "tokio-rs"; repo = "console"; rev = "tokio-console-v${version}"; - hash = "sha256-zISgEhUmAfHErq4AelbnSwtKjtxYH//pbLUAlPKxQYk="; + hash = "sha256-sjfdxOeaNANYJuJMjZ/tCGc2mWM+98d8yPHAVSl4cF4="; }; - cargoHash = "sha256-qK8U6BZN7sdBP8CbzsDeewsGulNA/KFVS9vscBxysRg="; + cargoHash = "sha256-86KQpRpYSCQs6SUeG0HV26b58x/QUyovoL+5fg8JCOI="; nativeBuildInputs = [ protobuf ]; - cargoPatches = [ ./cargo-lock.patch ]; - # uses currently unstable tokio features RUSTFLAGS = "--cfg tokio_unstable"; From 8f19a5443f9b48b9260c0aa0d846c561c0c6189c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 26 Mar 2024 04:20:00 +0000 Subject: [PATCH 2/2] tokio-console: install completions --- pkgs/development/tools/tokio-console/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/tokio-console/default.nix b/pkgs/development/tools/tokio-console/default.nix index 7d65f382f957..c37bf85de975 100644 --- a/pkgs/development/tools/tokio-console/default.nix +++ b/pkgs/development/tools/tokio-console/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, installShellFiles , rustPlatform , protobuf }: @@ -17,7 +18,10 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-86KQpRpYSCQs6SUeG0HV26b58x/QUyovoL+5fg8JCOI="; - nativeBuildInputs = [ protobuf ]; + nativeBuildInputs = [ + installShellFiles + protobuf + ]; # uses currently unstable tokio features RUSTFLAGS = "--cfg tokio_unstable"; @@ -29,6 +33,13 @@ rustPlatform.buildRustPackage rec { "--skip config::tests::toml_example_changed" ]; + postInstall = '' + installShellCompletion --cmd tokio-console \ + --bash <($out/bin/tokio-console --log-dir $(mktemp -d) gen-completion bash) \ + --fish <($out/bin/tokio-console --log-dir $(mktemp -d) gen-completion fish) \ + --zsh <($out/bin/tokio-console --log-dir $(mktemp -d) gen-completion zsh) + ''; + meta = with lib; { description = "A debugger for asynchronous Rust code"; homepage = "https://github.com/tokio-rs/console";