Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 unzip, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "libjson"; 10 version = "7.6.1"; 11 src = fetchurl { 12 url = "mirror://sourceforge/libjson/libjson_${version}.zip"; 13 sha256 = "0xkk5qc7kjcdwz9l04kmiz1nhmi7iszl3k165phf53h3a4wpl9h7"; 14 }; 15 patches = [ ./install-fix.patch ]; 16 nativeBuildInputs = [ unzip ]; 17 makeFlags = [ "prefix=$(out)" ]; 18 env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ]; 19 preInstall = "mkdir -p $out/lib"; 20 21 meta = with lib; { 22 homepage = "http://libjson.sourceforge.net/"; 23 description = "JSON reader and writer"; 24 longDescription = '' 25 A JSON reader and writer which is super-efficient and 26 usually runs circles around other JSON libraries. 27 It's highly customizable to optimize for your particular project, and 28 very lightweight. For Windows, OSX, or Linux. Works in any language. 29 ''; 30 platforms = platforms.unix; 31 license = licenses.bsd2; 32 }; 33}