Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 72 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch, 6 perl, 7 pkg-config, 8 buildsystem, 9 libparserutils, 10 libwapcaplet, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "netsurf-libcss"; 15 version = "0.9.2"; 16 17 src = fetchurl { 18 url = "http://download.netsurf-browser.org/libs/releases/libcss-${finalAttrs.version}-src.tar.gz"; 19 hash = "sha256-LfIVu+w01R1gwaBLAbLfTV0Y9RDx86evS4DN21ZxFU4="; 20 }; 21 22 patches = [ 23 # select: computed: Squash -Wcalloc-transposed-args (gcc-14) 24 # remove on next release 25 (fetchpatch { 26 name = "fix-calloc-transposed-args-computed.patch"; 27 url = "https://source.netsurf-browser.org/libcss.git/patch/?id=0541e18b442d2f46abc0f0b09e0db950e1b657e5"; 28 hash = "sha256-6nrT1S1E+jU6UDr3BZo9GH8jcSiIwTNLnmI1rthhhws="; 29 }) 30 # select: select: Squash -Wcalloc-transposed-args (gcc-14) 31 # remove on next release 32 (fetchpatch { 33 name = "fix-calloc-transposed-args-select.patch"; 34 url = "https://source.netsurf-browser.org/libcss.git/patch/?id=8619d09102d6cc34d63fe87195c548852fc93bf4"; 35 hash = "sha256-Clkhw/n/+NQR/T8Gi+2Lc1Neq5dWsNKM8RqieYuTnzQ="; 36 }) 37 ]; 38 39 nativeBuildInputs = [ pkg-config ]; 40 41 buildInputs = [ 42 perl 43 buildsystem 44 libparserutils 45 libwapcaplet 46 ]; 47 48 makeFlags = [ 49 "PREFIX=$(out)" 50 "NSSHARED=${buildsystem}/share/netsurf-buildsystem" 51 ]; 52 53 env.NIX_CFLAGS_COMPILE = toString [ 54 "-Wno-error=implicit-fallthrough" 55 "-Wno-error=${if stdenv.cc.isGNU then "maybe-uninitialized" else "uninitialized"}" 56 ]; 57 58 enableParallelBuilding = true; 59 60 meta = { 61 homepage = "https://www.netsurf-browser.org/projects/libcss/"; 62 description = "Cascading Style Sheets library for netsurf browser"; 63 longDescription = '' 64 LibCSS is a CSS parser and selection engine. It aims to parse the forward 65 compatible CSS grammar. It was developed as part of the NetSurf project 66 and is available for use by other software, under a more permissive 67 license. 68 ''; 69 license = lib.licenses.mit; 70 inherit (buildsystem.meta) maintainers platforms; 71 }; 72})