Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / litehtml / default.nix
blob3927f7cce4a53c3a5c28c00807ad6ae13b1c048d
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 , gumbo
6 }:
8 stdenv.mkDerivation rec {
9   pname = "litehtml";
10   version = "0.6";
12   src = fetchFromGitHub {
13     owner = "litehtml";
14     repo = "litehtml";
15     rev = "v${version}";
16     hash = "sha256-9571d3k8RkzEpMWPuIejZ7njLmYstSwFUaSqT3sk6uQ=";
17   };
19   # Don't search for non-existant gumbo cmake config
20   # This will mislead cmake that litehtml is not found
21   # Affects build of pkgs that depend on litehtml
22   postPatch = ''
23     substituteInPlace cmake/litehtmlConfig.cmake \
24       --replace "find_dependency(gumbo)" ""
25   '';
27   nativeBuildInputs = [
28     cmake
29   ];
31   buildInputs = [
32     gumbo
33   ];
35   cmakeFlags = [
36     "-DEXTERNAL_GUMBO=ON"
37   ];
39   meta = with lib; {
40     description = "Fast and lightweight HTML/CSS rendering engine";
41     homepage = "http://www.litehtml.com/";
42     license = licenses.bsd3;
43     platforms = platforms.all;
44     maintainers = with maintainers; [ fgaz ];
45   };