at 24.05-pre 40 lines 1.3 kB view raw
1{ fetchurl, lib, stdenv 2, CoreServices 3}: 4 5stdenv.mkDerivation rec { 6 pname = "check"; 7 version = "0.15.2"; 8 9 src = fetchurl { 10 url = "https://github.com/libcheck/check/releases/download/${version}/check-${version}.tar.gz"; 11 sha256 = "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"; 12 }; 13 14 # fortify breaks the libcompat vsnprintf implementation 15 hardeningDisable = lib.optionals (stdenv.hostPlatform.isMusl && (stdenv.hostPlatform != stdenv.buildPlatform)) [ "fortify" ]; 16 17 # Test can randomly fail: https://hydra.nixos.org/build/7243912 18 doCheck = false; 19 20 buildInputs = lib.optional stdenv.isDarwin CoreServices; 21 22 meta = with lib; { 23 description = "Unit testing framework for C"; 24 25 longDescription = 26 '' Check is a unit testing framework for C. It features a simple 27 interface for defining unit tests, putting little in the way of the 28 developer. Tests are run in a separate address space, so Check can 29 catch both assertion failures and code errors that cause 30 segmentation faults or other signals. The output from unit tests 31 can be used within source code editors and IDEs. 32 ''; 33 34 homepage = "https://libcheck.github.io/check/"; 35 36 license = licenses.lgpl2Plus; 37 mainProgram = "checkmk"; 38 platforms = platforms.all; 39 }; 40}