1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 fetchPypi,
6 re2,
7}:
8
9buildPythonPackage rec {
10 pname = "fb-re2";
11 version = "1.0.7";
12 format = "setuptools";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "83b2c2cd58d3874e6e3a784cf4cf2f1a57ce1969e50180f92b010eea24ef26cf";
17 };
18
19 patches = [
20 # Bump stdlib to c++17 to fix build with recent re2
21 # https://github.com/facebook/pyre2/issues/24
22 # https://github.com/facebook/pyre2/pull/25
23 (fetchpatch {
24 url = "https://github.com/facebook/pyre2/pull/25/commits/08fb06ec3ccd412ca69483d27234684a04cb91a0.patch";
25 hash = "sha256-kzxE2AxpE1tJJK0dJgoFfVka9zy2u0HEqiHoS7DQDQ0=";
26 })
27 ];
28
29 buildInputs = [ re2 ];
30
31 # no tests in PyPI tarball
32 doCheck = false;
33
34 meta = {
35 description = "Python wrapper for Google's RE2";
36 homepage = "https://github.com/facebook/pyre2";
37 license = lib.licenses.bsd3;
38 maintainers = with lib.maintainers; [ ivan ];
39 };
40}