From 68dcd5fe071dc04460adcf3fc0d5d53f9ac2670c Mon Sep 17 00:00:00 2001 From: arthsmn Date: Thu, 28 Dec 2023 18:59:18 -0300 Subject: [PATCH] repgrep: 0.14.3 -> 0.15.0 --- pkgs/tools/text/repgrep/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/text/repgrep/default.nix b/pkgs/tools/text/repgrep/default.nix index cefc0fba0349..607aa230569b 100644 --- a/pkgs/tools/text/repgrep/default.nix +++ b/pkgs/tools/text/repgrep/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , rustPlatform , fetchFromGitHub , asciidoctor @@ -9,16 +10,16 @@ rustPlatform.buildRustPackage rec { pname = "repgrep"; - version = "0.14.3"; + version = "0.15.0"; src = fetchFromGitHub { owner = "acheronfail"; repo = "repgrep"; rev = version; - hash = "sha256-33b0dZJY/lnVJGMfAg/faD6PPJIFZsvMZOmKAqCZw8k="; + hash = "sha256-6ba7EJUts0Ni9EA3ENlK+a2FaPo7JohtCyqwR9DdL1E="; }; - cargoHash = "sha256-UMMTdWJ0/M8lN4abTJEVUGtoNp/g49DyW+OASg3TKfg="; + cargoHash = "sha256-XEjKTZ3qaiLWbm2wF+V97u9tGXDq/oTm249ubUE9n94="; nativeBuildInputs = [ asciidoctor @@ -32,8 +33,13 @@ rustPlatform.buildRustPackage rec { pushd "$(dirname "$(find -path '**/repgrep-stamp' | head -n 1)")" installManPage rgr.1 - installShellCompletion rgr.{bash,fish} _rgr popd + '' + lib.optionalString (stdenv.hostPlatform.canExecute stdenv.buildPlatform) '' + # As it can be seen here: https://github.com/acheronfail/repgrep/blob/0.15.0/.github/workflows/release.yml#L206, the completions are just the same as ripgrep + installShellCompletion --cmd rgr \ + --bash <(${lib.getExe ripgrep} --generate complete-bash | sed 's/-c rg/-c rgr/') \ + --zsh <(${lib.getExe ripgrep} --generate complete-zsh | sed 's/-c rg/-c rgr/') \ + --fish <(${lib.getExe ripgrep} --generate complete-fish | sed 's/-c rg/-c rgr/') ''; meta = with lib; {