1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost } :
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-T7ZUVVYGdzAialse//MoqWCVNBpbZvzWMAKc0cw7O9k=";
15 # Pull fix pending upstream inclusion for gcc-13 support:
16 # https://github.com/f4exb/cm256cc/pull/18
18 name = "gcc-13.patch";
19 url = "https://github.com/f4exb/cm256cc/commit/a7f142bcdae8be1c646d67176ba0ba0f7e8dcd68.patch";
20 hash = "sha256-J7bm44sqnGsdPhJxQrE8LDxZ6tkTzLslHQnnKmtgrtM=";
24 nativeBuildInputs = [ cmake ];
25 buildInputs = [ boost ];
27 # https://github.com/f4exb/cm256cc/issues/16
29 substituteInPlace libcm256cc.pc.in \
30 --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
34 description = "Fast GF(256) Cauchy MDS Block Erasure Codec in C++";
35 homepage = "https://github.com/f4exb/cm256cc";
36 platforms = platforms.unix;
37 maintainers = with maintainers; [ alkeryn ];
38 license = licenses.gpl3;