Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, cmake 6}: 7 8stdenv.mkDerivation rec { 9 pname = "unittest-cpp"; 10 version = "2.0.0"; 11 12 src = fetchFromGitHub { 13 owner = "unittest-cpp"; 14 repo = "unittest-cpp"; 15 rev = "v${version}"; 16 sha256 = "0sxb3835nly1jxn071f59fwbdzmqi74j040r81fanxyw3s1azw0i"; 17 }; 18 19 patches = [ 20 # GCC12 Patch 21 (fetchpatch { 22 url = "https://github.com/unittest-cpp/unittest-cpp/pull/185/commits/f361c2a1034c02ba8059648f9a04662d6e2b5553.patch"; 23 hash = "sha256-xyhV2VBelw/uktUXSZ3JBxgG+8/Mout/JiXEZVV2+2Y="; 24 }) 25 ]; 26 27 # Fix 'Version:' setting in .pc file. TODO: remove once upstreamed: 28 # https://github.com/unittest-cpp/unittest-cpp/pull/188 29 cmakeFlags = [ "-DPACKAGE_VERSION=${version}" ]; 30 31 nativeBuildInputs = [ cmake ]; 32 33 doCheck = false; 34 35 meta = { 36 homepage = "https://github.com/unittest-cpp/unittest-cpp"; 37 description = "Lightweight unit testing framework for C++"; 38 license = lib.licenses.mit; 39 maintainers = []; 40 platforms = lib.platforms.unix; 41 }; 42}