diff options
author | Colin <colin@uninsane.org> | 2023-11-27 23:45:23 +0000 |
---|---|---|
committer | Colin <colin@uninsane.org> | 2023-11-27 23:45:23 +0000 |
commit | 2319f134fb6491527d95c61e5b9335f2d642d717 (patch) | |
tree | 3203ff4eaacaf8f18380b045fae5ab49f7e61544 /pkgs/tools/text/ripgrep | |
parent | c76b72caa421e31d998e4a05387ebd3b40454327 (diff) | |
download | nixlib-2319f134fb6491527d95c61e5b9335f2d642d717.tar nixlib-2319f134fb6491527d95c61e5b9335f2d642d717.tar.gz nixlib-2319f134fb6491527d95c61e5b9335f2d642d717.tar.bz2 nixlib-2319f134fb6491527d95c61e5b9335f2d642d717.tar.lz nixlib-2319f134fb6491527d95c61e5b9335f2d642d717.tar.xz nixlib-2319f134fb6491527d95c61e5b9335f2d642d717.tar.zst nixlib-2319f134fb6491527d95c61e5b9335f2d642d717.zip |
ripgrep: fix cross compilation
Diffstat (limited to 'pkgs/tools/text/ripgrep')
-rw-r--r-- | pkgs/tools/text/ripgrep/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
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) \ |