Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 48 lines 1.0 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, gumbo 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "litehtml"; 10 version = "0.9"; 11 12 src = fetchFromGitHub { 13 owner = "litehtml"; 14 repo = "litehtml"; 15 rev = "v${finalAttrs.version}"; 16 hash = "sha256-ZE/HKzo3ejKpW/ih3sJwn2hzCtsBhAXeJWGezYd6Yc4"; 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-fail "find_dependency(gumbo)" "" 25 ''; 26 27 nativeBuildInputs = [ 28 cmake 29 ]; 30 31 buildInputs = [ 32 gumbo 33 ]; 34 35 cmakeFlags = [ 36 "-DEXTERNAL_GUMBO=ON" 37 # BuildTesting need to download test data online 38 "-DLITEHTML_BUILD_TESTING=OFF" 39 ]; 40 41 meta = with lib; { 42 description = "Fast and lightweight HTML/CSS rendering engine"; 43 homepage = "http://www.litehtml.com/"; 44 license = licenses.bsd3; 45 platforms = platforms.all; 46 maintainers = with maintainers; [ fgaz ]; 47 }; 48})