diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2023-01-30 15:46:14 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2023-01-30 18:24:03 -0300 |
commit | d9f45ec99e87647d72fef9af1fada62023cfc581 (patch) | |
tree | 90d18ad0c62c816d4809abc0622246cb74e38b92 /pkgs/development/libraries/cmocka | |
parent | 56b467d46724de70809859569dcc8a84f45d5ce5 (diff) |
cmocka: enable tests and set broken for static
Diffstat (limited to 'pkgs/development/libraries/cmocka')
-rw-r--r-- | pkgs/development/libraries/cmocka/default.nix | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/pkgs/development/libraries/cmocka/default.nix b/pkgs/development/libraries/cmocka/default.nix index ed78f4f9ec84a..746b47841580b 100644 --- a/pkgs/development/libraries/cmocka/default.nix +++ b/pkgs/development/libraries/cmocka/default.nix @@ -20,38 +20,42 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - meta = with lib; { - description = "Lightweight library to simplify and generalize unit tests for C"; + cmakeFlags = lib.optional doCheck "-DUNIT_TESTING=ON" + ++ lib.optional stdenv.hostPlatform.isStatic "-DBUILD_SHARED_LIBS=OFF"; - longDescription = - ''There are a variety of C unit testing frameworks available however - many of them are fairly complex and require the latest compiler - technology. Some development requires the use of old compilers which - makes it difficult to use some unit testing frameworks. In addition - many unit testing frameworks assume the code being tested is an - application or module that is targeted to the same platform that will - ultimately execute the test. Because of this assumption many - frameworks require the inclusion of standard C library headers in the - code module being tested which may collide with the custom or - incomplete implementation of the C library utilized by the code under - test. - - Cmocka only requires a test application is linked with the standard C - library which minimizes conflicts with standard C library headers. - Also, CMocka tries to avoid the use of some of the newer features of - C compilers. - - This results in CMocka being a relatively small library that can be - used to test a variety of exotic code. If a developer wishes to - simply test an application with the latest compiler then other unit - testing frameworks may be preferable. - - This is the successor of Google's Cmockery.''; + doCheck = true; + meta = with lib; { + description = "Lightweight library to simplify and generalize unit tests for C"; + longDescription = '' + There are a variety of C unit testing frameworks available however + many of them are fairly complex and require the latest compiler + technology. Some development requires the use of old compilers which + makes it difficult to use some unit testing frameworks. In addition + many unit testing frameworks assume the code being tested is an + application or module that is targeted to the same platform that will + ultimately execute the test. Because of this assumption many + frameworks require the inclusion of standard C library headers in the + code module being tested which may collide with the custom or + incomplete implementation of the C library utilized by the code under + test. + + Cmocka only requires a test application is linked with the standard C + library which minimizes conflicts with standard C library headers. + Also, CMocka tries to avoid the use of some of the newer features of + C compilers. + + This results in CMocka being a relatively small library that can be + used to test a variety of exotic code. If a developer wishes to + simply test an application with the latest compiler then other unit + testing frameworks may be preferable. + + This is the successor of Google's Cmockery. + ''; homepage = "https://cmocka.org/"; - license = licenses.asl20; platforms = platforms.all; maintainers = with maintainers; [ kragniz rasendubi ]; + broken = stdenv.hostPlatform.isStatic; # See https://github.com/NixOS/nixpkgs/issues/213623 }; } |