Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / termcolor / default.nix
blobfbae29f4ca583e9fca59a98cf22ea63006fa2893
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 }:
7 stdenv.mkDerivation rec {
8   pname = "termcolor";
9   version = "2.1.0";
11   src = fetchFromGitHub {
12     owner = "ikalnytskyi";
13     repo = "termcolor";
14     rev = "v${version}";
15     sha256 = "sha256-2RXQ8sn2VNhQ2WZfwCCeQuM6x6C+sLA6ulAaFtaDMZw=";
16   };
18   nativeBuildInputs = [ cmake ];
20   cmakeFlags = [ "-DTERMCOLOR_TESTS=ON" ];
22   doCheck = true;
24   checkPhase = ''
25     runHook preCheck
26     ./test_termcolor
27     runHook postCheck
28   '';
30   meta = with lib; {
31     description = "Header-only C++ library for printing colored messages";
32     homepage = "https://github.com/ikalnytskyi/termcolor";
33     license = licenses.bsd3;
34     platforms = platforms.unix;
35     maintainers = with maintainers; [ prusnak ];
36   };