2013-08-15 06:07:04 -07:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-05-23 21:37:33 -07:00
|
|
|
name = "re2-${version}";
|
2014-04-26 11:12:20 -07:00
|
|
|
version = "20140304";
|
2013-08-15 06:07:04 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-05-23 21:37:33 -07:00
|
|
|
url = "https://re2.googlecode.com/files/${name}.tgz";
|
2014-04-26 11:12:20 -07:00
|
|
|
sha256 = "19wn0472c9dsxp35d0m98hlwhngx1f2xhxqgr8cb5x72gnjx3zqb";
|
2013-08-15 06:07:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile --replace "/usr/local" "$out"
|
2017-09-09 06:09:19 -07:00
|
|
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
# Fixed in https://github.com/google/re2/commit/b2c9765b4a7afbea8b6be1dae548b6f4d5f39e42
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-dynamiclib' '-dynamiclib -Wl,-install_name,$(libdir)/libre2.so.$(SONAME)'
|
2013-08-15 06:07:04 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://code.google.com/p/re2/;
|
|
|
|
description = "An efficient, principled regular expression library";
|
2015-05-28 10:20:29 -07:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2013-08-15 06:07:04 -07:00
|
|
|
platforms = with stdenv.lib.platforms; all;
|
|
|
|
};
|
|
|
|
}
|