Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 cmake, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "catch"; 11 version = "1.12.2"; 12 13 src = fetchFromGitHub { 14 owner = "catchorg"; 15 repo = "Catch"; 16 rev = "v${version}"; 17 sha256 = "1gdp5wm8khn02g2miz381llw3191k7309qj8s3jd6sasj01rhf23"; 18 }; 19 20 nativeBuildInputs = [ cmake ]; 21 cmakeFlags = [ "-DUSE_CPP14=ON" ]; 22 23 patches = [ 24 # https://github.com/catchorg/Catch2/pull/2151 25 (fetchpatch { 26 url = "https://github.com/catchorg/Catch2/commit/bb6d08323f23a39eb65dd86671e68f4f5d3f2d6c.patch"; 27 sha256 = "1vhbzx84nrhhf9zlbl6h5zmg3r5w5v833ihlswsysb9wp2i4isc5"; 28 }) 29 30 # Fix glibc-2.34 build 31 (fetchpatch { 32 url = "https://src.fedoraproject.org/rpms/catch1/raw/23276476148a657e7a45ade547f858cbf965a33a/f/catch1-sigstksz.patch"; 33 sha256 = "sha256-XSsI3iDEZCUSbozlYWC0y/LZ7qr/5zwACpn1jHKD0yU="; 34 }) 35 ]; 36 37 doCheck = true; 38 checkTarget = "test"; 39 40 meta = with lib; { 41 description = "Multi-paradigm automated test framework for C++ and Objective-C (and, maybe, C)"; 42 homepage = "http://catch-lib.net"; 43 license = licenses.boost; 44 maintainers = with maintainers; [ 45 edwtjo 46 ]; 47 platforms = with platforms; unix; 48 }; 49}