Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, gumbo 6}: 7 8stdenv.mkDerivation rec { 9 pname = "litehtml"; 10 version = "0.6"; 11 12 src = fetchFromGitHub { 13 owner = "litehtml"; 14 repo = "litehtml"; 15 rev = "v${version}"; 16 hash = "sha256-9571d3k8RkzEpMWPuIejZ7njLmYstSwFUaSqT3sk6uQ="; 17 }; 18 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 ''; 26 27 nativeBuildInputs = [ 28 cmake 29 ]; 30 31 buildInputs = [ 32 gumbo 33 ]; 34 35 cmakeFlags = [ 36 "-DEXTERNAL_GUMBO=ON" 37 ]; 38 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 }; 46}