2021-02-05 17:12:51 +00:00
|
|
|
{ fetchurl, lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, CoreServices
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "check";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "0.15.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/libcheck/check/releases/download/${version}/check-${version}.tar.gz";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# fortify breaks the libcompat vsnprintf implementation
|
|
|
|
hardeningDisable = lib.optionals (stdenv.hostPlatform.isMusl && (stdenv.hostPlatform != stdenv.buildPlatform)) [ "fortify" ];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
# Test can randomly fail: https://hydra.nixos.org/build/7243912
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin CoreServices;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Unit testing framework for C";
|
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' Check is a unit testing framework for C. It features a simple
|
|
|
|
interface for defining unit tests, putting little in the way of the
|
|
|
|
developer. Tests are run in a separate address space, so Check can
|
|
|
|
catch both assertion failures and code errors that cause
|
|
|
|
segmentation faults or other signals. The output from unit tests
|
|
|
|
can be used within source code editors and IDEs.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = "https://libcheck.github.io/check/";
|
|
|
|
|
|
|
|
license = licenses.lgpl2Plus;
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "checkmk";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|