Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 61 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch, 6 expat, 7 pkg-config, 8 buildsystem, 9 libparserutils, 10 libwapcaplet, 11 libhubbub, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "netsurf-libdom"; 16 version = "0.4.2"; 17 18 src = fetchurl { 19 url = "http://download.netsurf-browser.org/libs/releases/libdom-${finalAttrs.version}-src.tar.gz"; 20 hash = "sha256-0F5FrxZUcBTCsKOuzzZw+hPUGfUFs/X8esihSR/DDzw="; 21 }; 22 23 patches = [ 24 # fixes libdom build on gcc 14 due to calloc-transposed-args warning 25 # remove on next release 26 (fetchpatch { 27 name = "fix-calloc-transposed-args.patch"; 28 url = "https://source.netsurf-browser.org/libdom.git/patch/?id=2687282d56dfef19e26e9639a5c0cd81de957e22"; 29 hash = "sha256-1uAdLM9foplCVu8IQlMMlXh6OWHs5eUgsKp+0ZqM9yM="; 30 }) 31 ]; 32 33 nativeBuildInputs = [ pkg-config ]; 34 35 buildInputs = [ 36 expat 37 buildsystem 38 libhubbub 39 libparserutils 40 libwapcaplet 41 ]; 42 43 makeFlags = [ 44 "PREFIX=$(out)" 45 "NSSHARED=${buildsystem}/share/netsurf-buildsystem" 46 ]; 47 48 enableParallelBuilding = true; 49 50 meta = { 51 homepage = "https://www.netsurf-browser.org/projects/libdom/"; 52 description = "Document Object Model library for netsurf browser"; 53 longDescription = '' 54 LibDOM is an implementation of the W3C DOM, written in C. It is currently 55 in development for use with NetSurf and is intended to be suitable for use 56 in other projects under a more permissive license. 57 ''; 58 license = lib.licenses.mit; 59 inherit (buildsystem.meta) maintainers platforms; 60 }; 61})