nixpkgs/pkgs/development/libraries/re2/default.nix

34 lines
850 B
Nix
Raw Normal View History

2019-05-31 20:21:14 +01:00
{ stdenv, fetchFromGitHub }:
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
pname = "re2";
2020-10-05 20:07:13 +01:00
version = "20201001";
2019-05-31 20:21:14 +01:00
src = fetchFromGitHub {
owner = "google";
repo = "re2";
2020-10-05 20:07:13 +01:00
rev = "2020-10-01";
sha256 = "0a5f7av1pk6p3jxc2w6prl00lyrplap97m68hnhw7jllnwljk0bx";
};
preConfigure = ''
substituteInPlace Makefile --replace "/usr/local" "$out"
2019-05-31 20:21:14 +01:00
# we're using gnu sed, even on darwin
substituteInPlace Makefile --replace "SED_INPLACE=sed -i '''" "SED_INPLACE=sed -i"
'';
2019-05-31 22:28:45 +01:00
preCheck = "patchShebangs runtests";
doCheck = true;
checkTarget = "test";
doInstallCheck = true;
installCheckTarget = "testinstall";
meta = {
homepage = "https://github.com/google/re2";
description = "An efficient, principled regular expression library";
license = stdenv.lib.licenses.bsd3;
platforms = with stdenv.lib.platforms; all;
};
}