2017-03-26 17:12:13 +02:00
|
|
|
{ stdenv, fetchurl, fetchpatch }:
|
2015-10-10 02:08:25 +02:00
|
|
|
|
2016-05-24 16:15:43 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-09-14 16:57:01 +02:00
|
|
|
name = "pcre2-${version}";
|
2017-03-26 17:12:13 +02:00
|
|
|
version = "10.23";
|
2015-10-10 02:08:25 +02:00
|
|
|
src = fetchurl {
|
2016-05-24 16:15:43 +02:00
|
|
|
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${name}.tar.bz2";
|
2017-03-26 17:12:13 +02:00
|
|
|
sha256 = "0vn5g0mkkp99mmzpissa06hpyj6pk9s4mlwbjqrjvw3ihy8rpiyz";
|
2015-10-10 02:08:25 +02:00
|
|
|
};
|
|
|
|
|
2015-10-10 20:56:24 +02:00
|
|
|
configureFlags = [
|
2015-10-10 20:56:34 +02:00
|
|
|
"--enable-pcre2-16"
|
|
|
|
"--enable-pcre2-32"
|
2015-10-10 20:56:24 +02:00
|
|
|
"--enable-jit"
|
|
|
|
];
|
|
|
|
|
2017-03-26 17:12:13 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2017-7186-part1.patch";
|
|
|
|
url = "https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_ucd.c?view=patch&r1=316&r2=670&sortby=date";
|
|
|
|
sha256 = "10yzglvbn7h06hg7zffr5zh378i5jihvx7d5gggkynws79vgwvfr";
|
|
|
|
stripLen = 2;
|
|
|
|
addPrefixes = true;
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2017-7186-part2.patch";
|
|
|
|
url = "https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_internal.h?view=patch&r1=600&r2=670&sortby=date";
|
|
|
|
sha256 = "1bggk7vd5hg0bjg96lj4h1lacmr6grq68dm6iz1n7vg3zf7virjn";
|
|
|
|
stripLen = 2;
|
|
|
|
addPrefixes = true;
|
|
|
|
})
|
2017-11-28 05:47:37 +01:00
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2017-8786.patch";
|
|
|
|
url = "https://vcs.pcre.org/pcre2/code/trunk/src/pcre2test.c?r1=692&r2=697&view=patch";
|
|
|
|
sha256 = "1c629nzrk4il2rfclwyc1a373q58m4q9ys9wr91zhl4skfk7x19b";
|
|
|
|
stripLen = 2;
|
|
|
|
addPrefixes = true;
|
|
|
|
})
|
2017-03-26 17:12:13 +02:00
|
|
|
];
|
|
|
|
|
2016-09-14 16:57:01 +02:00
|
|
|
outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
moveToOutput bin/pcre2-config "$dev"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Perl Compatible Regular Expressions";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://www.pcre.org/;
|
2016-09-14 16:57:01 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ttuegel ];
|
|
|
|
platforms = platforms.all;
|
2015-10-10 02:08:25 +02:00
|
|
|
};
|
|
|
|
}
|