@@ -1,4 +1,4 @@
1−{ fetchurl, stdenv, cmake }:
1+{ fetchurl, stdenv, cmake, fetchpatch }:
22
33stdenv.mkDerivation rec {
44 name = "cmocka-${version}";
@@ -9,6 +9,18 @@ stdenv.mkDerivation rec {
99 sha256 = "0fvm6rdalqcxckbddch8ycdw6n2ckldblv117n09chi2l7bm0q5k";
1010 };
1111
12+ patches = [
13+ # This fixes the build for clang-3.7.0 and thus Darwin.
14+ # See https://open.cryptomilk.org/issues/43 for more info.
15+ #
16+ # The patch is already merged to upstream, so it should be removed
17+ # here on next release.
18+ (fetchpatch {
19+ url = "https://git.cryptomilk.org/projects/cmocka.git/patch/?id=1b595a80934fa95234fb290913cfe533f740d965";
20+ sha256 = "1fg8xwb1mrrmw4dqa65ghnvgfdkpi0lv4j2gq0lm9ayvsi3v00vp";
21+ })
22+ ];
23+
1224 nativeBuildInputs = [ cmake ];
1325
1426 meta = with stdenv.lib; {
@@ -43,6 +55,6 @@ stdenv.mkDerivation rec {
4355
4456 license = licenses.asl20;
4557 platforms = platforms.all;
46− maintainers = with maintainers; [ kragniz ];
58+ maintainers = with maintainers; [ kragniz rasendubi ];
4759 };
4860}