-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git: add pcre2 support #27962
git: add pcre2 support #27962
Conversation
I don't know if enable pcre2 by default is a good a idea so don't hesitate to ask for changing it to be disabled by default |
@@ -70,7 +72,9 @@ stdenv.mkDerivation { | |||
# so that `SPARSE_FLAGS' corresponds to the current architecture... | |||
#doCheck = true; | |||
|
|||
installFlags = "NO_INSTALL_HARDLINKS=1"; | |||
installFlags = "NO_INSTALL_HARDLINKS=1" | |||
+ (if withpcre2 then " USE_LIBPCRE2=1" else ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know, where git uses libpcre2? I assume it replaces a slower posix regex engine somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is libpcre2
already part of the dependency closure? Then we can just enable it. An alternative would be to add it only to gitFull
. I have no strong opinion, whether it should be enabled in the git
derivation. Purist would probably disable it, since git
is required for fetchgit
, while this feature seems to be mostly used in interactive environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, libpcre (1) is in the closure ATM. Version 2 is rather new and rarely used so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still, pcre2 is (only) 1.5 MB and has no deps itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vcunat only libpcre2 is recommended by git https://github.com/git/git/blob/master/Documentation/RelNotes/2.14.0.txt#L29
@Mic92 I think you're right and I've updated the pull request to disable pcre2 by default in gitMinimal
Except for gitMinimal, as pcre1 is in closure anyway so using pcre2 increases the size by ~1.4 MB.
Motivation for this change
Add pcre2 support to the last git version (2.14.0)
Things done
Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)