1{
2 lib,
3 stdenv,
4 fetchurl,
5 fetchpatch,
6 gperf,
7 pkg-config,
8 buildsystem,
9 libdom,
10 libhubbub,
11 libparserutils,
12 libwapcaplet,
13}:
14
15stdenv.mkDerivation (finalAttrs: {
16 pname = "netsurf-libsvgtiny";
17 version = "0.1.8";
18
19 src = fetchurl {
20 url = "http://download.netsurf-browser.org/libs/releases/libsvgtiny-${finalAttrs.version}-src.tar.gz";
21 hash = "sha256-w1cifwLoP7KnaxK5ARkaCCIp2x8Ac2Lo8xx1RRDCoBw=";
22 };
23
24 patches = [
25 # fixes libdom build on gcc 14 due to calloc-transposed-args warning
26 # remove on next release
27 (fetchpatch {
28 name = "fix-calloc-transposed-args.patch";
29 url = "https://source.netsurf-browser.org/libsvgtiny.git/patch/?id=9d14633496ae504557c95d124b97a71147635f04";
30 hash = "sha256-IRWWjyFXd+lWci/bKR9uPDKbP3ttK6zNB6Cy5bv4huc=";
31 })
32 ];
33
34 nativeBuildInputs = [
35 gperf
36 pkg-config
37 ];
38
39 buildInputs = [
40 buildsystem
41 libdom
42 libhubbub
43 libparserutils
44 libwapcaplet
45 ];
46
47 makeFlags = [
48 "PREFIX=$(out)"
49 "NSSHARED=${buildsystem}/share/netsurf-buildsystem"
50 ];
51
52 enableParallelBuilding = true;
53
54 meta = {
55 homepage = "https://www.netsurf-browser.org/projects/libsvgtiny/";
56 description = "NetSurf SVG decoder";
57 license = lib.licenses.mit;
58 inherit (buildsystem.meta) maintainers platforms;
59 };
60})