lol
at 23.05-pre 35 lines 1.1 kB view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }: 2stdenv.mkDerivation rec { 3 pname = "cereal"; 4 version = "1.3.0"; 5 6 nativeBuildInputs = [ cmake ]; 7 8 src = fetchFromGitHub { 9 owner = "USCiLab"; 10 repo = "cereal"; 11 rev = "v${version}"; 12 sha256 = "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p"; 13 }; 14 15 patches = [ 16 # https://nvd.nist.gov/vuln/detail/CVE-2020-11105 17 # serialized std::shared_ptr variables cannot always be expected to 18 # serialize back into their original values. This can have any number of 19 # consequences, depending on the context within which this manifests. 20 (fetchpatch { 21 name = "CVE-2020-11105.patch"; 22 url = "https://github.com/USCiLab/cereal/commit/f27c12d491955c94583512603bf32c4568f20929.patch"; 23 sha256 = "CIkbJ7bAN0MXBhTXQdoQKXUmY60/wQvsdn99FaWt31w="; 24 }) 25 ]; 26 27 cmakeFlags = [ "-DJUST_INSTALL_CEREAL=yes" ]; 28 29 meta = with lib; { 30 description = "A header-only C++11 serialization library"; 31 homepage = "https://uscilab.github.io/cereal/"; 32 platforms = platforms.all; 33 license = licenses.mit; 34 }; 35}