nixpkgs/pkgs/by-name/li/litehtml/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.0 KiB
Nix
Raw Normal View History

2022-11-07 16:47:59 +00:00
{
lib,
stdenv,
fetchFromGitHub,
cmake,
gumbo,
}:
2024-02-19 15:24:13 +00:00
stdenv.mkDerivation (finalAttrs: {
2022-11-07 16:47:59 +00:00
pname = "litehtml";
2024-04-05 16:51:17 +00:00
version = "0.9";
2022-11-07 16:47:59 +00:00
src = fetchFromGitHub {
owner = "litehtml";
repo = "litehtml";
2024-02-19 15:24:13 +00:00
rev = "v${finalAttrs.version}";
2024-04-05 16:51:17 +00:00
hash = "sha256-ZE/HKzo3ejKpW/ih3sJwn2hzCtsBhAXeJWGezYd6Yc4";
2022-11-07 16:47:59 +00:00
};
# Don't search for non-existant 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 \
2024-04-05 16:51:17 +00:00
--replace-fail "find_dependency(gumbo)" ""
'';
2022-11-07 16:47:59 +00:00
nativeBuildInputs = [
cmake
];
buildInputs = [
gumbo
];
cmakeFlags = [
"-DEXTERNAL_GUMBO=ON"
2024-04-05 16:51:17 +00:00
# BuildTesting need to download test data online
"-DLITEHTML_BUILD_TESTING=OFF"
2022-11-07 16:47:59 +00:00
];
meta = with lib; {
description = "Fast and lightweight HTML/CSS rendering engine";
homepage = "http://www.litehtml.com/";
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ fgaz ];
};
2024-02-19 15:24:13 +00:00
})