Files
Ihar HrachyshkaandWolfgang Walther 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

50 lines
1.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
gumbo,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "litehtml";
version = "0.9";
src = fetchFromGitHub {
owner = "litehtml";
repo = "litehtml";
rev = "v${finalAttrs.version}";
hash = "sha256-ZE/HKzo3ejKpW/ih3sJwn2hzCtsBhAXeJWGezYd6Yc4";
};
# Don't search for non-existent gumbo cmake config
# This will mislead cmake that litehtml is not found
# Affects build of pkgs that depend on litehtml
postPatch = ''
substituteInPlace cmake/litehtmlConfig.cmake \
--replace-fail "find_dependency(gumbo)" ""
'';
nativeBuildInputs = [
cmake
];
buildInputs = [
gumbo
];
cmakeFlags = [
"-DEXTERNAL_GUMBO=ON"
# BuildTesting need to download test data online
"-DLITEHTML_BUILD_TESTING=OFF"
];
meta = {
description = "Fast and lightweight HTML/CSS rendering engine";
homepage = "http://www.litehtml.com/";
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ fgaz ];
};
})