From 2319f134fb6491527d95c61e5b9335f2d642d717 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 27 Nov 2023 23:45:23 +0000 Subject: ripgrep: fix cross compilation --- pkgs/tools/text/ripgrep/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgs/tools/text/ripgrep') diff --git a/pkgs/tools/text/ripgrep/default.nix b/pkgs/tools/text/ripgrep/default.nix index 9e1512342ab9..32333f75e507 100644 --- a/pkgs/tools/text/ripgrep/default.nix +++ b/pkgs/tools/text/ripgrep/default.nix @@ -1,4 +1,5 @@ { lib, stdenv +, buildPackages , fetchFromGitHub , rustPlatform , installShellFiles @@ -6,6 +7,7 @@ , Security , withPCRE2 ? true , pcre2 +, enableManpages ? stdenv.hostPlatform.emulatorAvailable buildPackages }: rustPlatform.buildRustPackage rec { @@ -28,10 +30,10 @@ rustPlatform.buildRustPackage rec { buildFeatures = lib.optional withPCRE2 "pcre2"; - preFixup = '' - $out/bin/rg --generate man > rg.1 + preFixup = lib.optionalString enableManpages '' + ${stdenv.hostPlatform.emulator buildPackages} $out/bin/rg --generate man > rg.1 installManPage rg.1 - + '' + '' installShellCompletion --cmd rg \ --bash <($out/bin/rg --generate complete-bash) \ --fish <($out/bin/rg --generate complete-fish) \ -- cgit 1.4.1