at 22.05-pre 49 lines 2.0 kB view raw
1{ fetchurl, lib, stdenv, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "cmocka"; 5 majorVersion = "1.1"; 6 version = "${majorVersion}.5"; 7 8 src = fetchurl { 9 url = "https://cmocka.org/files/${majorVersion}/cmocka-${version}.tar.xz"; 10 sha256 = "1dm8pdvkyfa8dsbz9bpq7wwgixjij4sii9bbn5sgvqjm5ljdik7h"; 11 }; 12 13 nativeBuildInputs = [ cmake ]; 14 15 meta = with lib; { 16 description = "Lightweight library to simplify and generalize unit tests for C"; 17 18 longDescription = 19 ''There are a variety of C unit testing frameworks available however 20 many of them are fairly complex and require the latest compiler 21 technology. Some development requires the use of old compilers which 22 makes it difficult to use some unit testing frameworks. In addition 23 many unit testing frameworks assume the code being tested is an 24 application or module that is targeted to the same platform that will 25 ultimately execute the test. Because of this assumption many 26 frameworks require the inclusion of standard C library headers in the 27 code module being tested which may collide with the custom or 28 incomplete implementation of the C library utilized by the code under 29 test. 30 31 Cmocka only requires a test application is linked with the standard C 32 library which minimizes conflicts with standard C library headers. 33 Also, CMocka tries to avoid the use of some of the newer features of 34 C compilers. 35 36 This results in CMocka being a relatively small library that can be 37 used to test a variety of exotic code. If a developer wishes to 38 simply test an application with the latest compiler then other unit 39 testing frameworks may be preferable. 40 41 This is the successor of Google's Cmockery.''; 42 43 homepage = "https://cmocka.org/"; 44 45 license = licenses.asl20; 46 platforms = platforms.all; 47 maintainers = with maintainers; [ kragniz rasendubi ]; 48 }; 49}