Skip to content
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

Merged
merged 1 commit into from
Aug 27, 2017
Merged

git: add pcre2 support #27962

merged 1 commit into from
Aug 27, 2017

Conversation

mimame
Copy link
Member

@mimame mimame commented Aug 5, 2017

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.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mimame
Copy link
Member Author

mimame commented Aug 5, 2017

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 "");
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@Mic92 Mic92 Aug 6, 2017

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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

@vcunat vcunat merged commit 95bbe17 into NixOS:master Aug 27, 2017
vcunat added a commit that referenced this pull request Aug 27, 2017
Except for gitMinimal, as pcre1 is in closure anyway so using pcre2
increases the size by ~1.4 MB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants