Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 72 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 apr, 6 scons, 7 openssl, 8 aprutil, 9 zlib, 10 libkrb5, 11 pkg-config, 12 libiconv, 13 fetchpatch, 14}: 15 16stdenv.mkDerivation rec { 17 pname = "serf"; 18 version = "1.3.10"; 19 20 src = fetchurl { 21 url = "mirror://apache/serf/${pname}-${version}.tar.bz2"; 22 hash = "sha256-voHvCLqiUW7Np2p3rffe97wyJ+61eLmjO0X3tB3AZOY="; 23 }; 24 25 nativeBuildInputs = [ 26 pkg-config 27 scons 28 ]; 29 buildInputs = [ 30 apr 31 openssl 32 aprutil 33 zlib 34 libiconv 35 ] 36 ++ lib.optional (!stdenv.hostPlatform.isCygwin) libkrb5; 37 38 patches = [ 39 ./scons.patch 40 41 (fetchpatch { 42 url = "https://src.fedoraproject.org/rpms/libserf/raw/rawhide/f/libserf-1.3.9-errgetfunc.patch"; 43 hash = "sha256-FQJvXOIZ0iItvbbcu4kR88j74M7fOi7C/0NN3o1/ub4="; 44 }) 45 ]; 46 47 prefixKey = "PREFIX="; 48 49 preConfigure = '' 50 appendToVar sconsFlags "APR=$(echo ${apr.dev}/bin/*-config)" 51 appendToVar sconsFlags "APU=$(echo ${aprutil.dev}/bin/*-config)" 52 appendToVar sconsFlags "CC=$CC" 53 appendToVar sconsFlags "OPENSSL=${openssl}" 54 appendToVar sconsFlags "ZLIB=${zlib}" 55 '' 56 + lib.optionalString (!stdenv.hostPlatform.isCygwin) '' 57 appendToVar sconsFlags "GSSAPI=${libkrb5.dev}" 58 ''; 59 60 enableParallelBuilding = true; 61 62 meta = with lib; { 63 description = "HTTP client library based on APR"; 64 homepage = "https://serf.apache.org/"; 65 license = licenses.asl20; 66 maintainers = with maintainers; [ 67 orivej 68 raskin 69 ]; 70 platforms = platforms.linux ++ platforms.darwin; 71 }; 72}