Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{lib, stdenv, fetchurl, fetchpatch}: 2 3stdenv.mkDerivation rec { 4 pname = "tre"; 5 version = "0.8.0"; 6 src = fetchurl { 7 url = "https://laurikari.net/tre/${pname}-${version}.tar.gz"; 8 sha256 = "1pd7qsa7vc3ybdc6h2gr4pm9inypjysf92kab945gg4qa6jp11my"; 9 }; 10 11 patches = [ 12 (fetchpatch { 13 url = "https://sources.debian.net/data/main/t/tre/0.8.0-6/debian/patches/03-cve-2016-8859"; 14 sha256 = "0navhizym6qxd4gngrsslbij8x9r3s67p1jzzhvsnq6ky49j7w3p"; 15 }) 16 ]; 17 18 meta = { 19 description = "Lightweight and robust POSIX compliant regexp matching library"; 20 homepage = "https://laurikari.net/tre/"; 21 license = lib.licenses.bsd2; 22 mainProgram = "agrep"; 23 platforms = lib.platforms.unix; 24 }; 25}