git.iko.soy/typeable/nixpkgs
on master help sign in
ripgrep: link PCRE2 dynamically

The pcre2 crate which is used by ripgrep uses pkg-config to find the path of the PCRE2 dynamic library. If the pkg-config or the library is not found, PCRE2 will be built/linked statically. This change adds pkg-config to the nativeBuildInputs of ripgrep, so that the PCRE2 library is detected and dynamically linked.

commit797b60f0d760fc2cfcad0c15cb22a5b75ed81818 authorDaniël de Kok <me@danieldk.eu> dateMon 15 Feb 2021, 08:18 (6 years ago) parent2b37fe7
1 file changed+4−2
pkgs/tools/text/ripgrep/default.nix+4−2
pkgs/tools/text/ripgrep/default.nix+4−2
@@ -4,6 +4,7 @@
44, rustPlatform
55, asciidoctor
66, installShellFiles
7+, pkg-config
78, Security
89, withPCRE2 ? true
910, pcre2 ? null
@@ -24,9 +25,10 @@ rustPlatform.buildRustPackage rec {
2425
2526 cargoBuildFlags = lib.optional withPCRE2 "--features pcre2";
2627
27− nativeBuildInputs = [ asciidoctor installShellFiles ];
28+ nativeBuildInputs = [ asciidoctor installShellFiles ]
29+ ++ lib.optional withPCRE2 pkg-config;
2830 buildInputs = (lib.optional withPCRE2 pcre2)
29− ++ (lib.optional stdenv.isDarwin Security);
31+ ++ (lib.optional stdenv.isDarwin Security);
3032
3133 preFixup = ''
3234 installManPage $releaseDir/build/ripgrep-*/out/rg.1