1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
7 url = "mirror://apache/apr/${name}.tar.bz2";
8 sha256 = "1spp6r2a3xcl5yajm9safhzyilsdzgagc2dadif8x6z9nbq4iqg2";
11 patches = lib.optionals stdenv.isDarwin [ ./is-this-a-compiler-bug.patch ];
13 # This test needs the net
18 outputs = [ "out" "dev" ];
23 configureFlagsArray+=("--with-installbuilddir=$dev/share/build")
26 configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
27 "ac_cv_file__dev_zero=yes"
28 "ac_cv_func_setpgrp_void=0"
29 "apr_cv_process_shared_works=1"
30 "apr_cv_tcp_nodelay_with_cork=1"
31 ] ++ lib.optionals (stdenv.hostPlatform.system == "i686-cygwin") [
32 # Including the Windows headers breaks unistd.h.
33 # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2
34 "ac_cv_header_windows_h=no"
37 CPPFLAGS=lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-DAPR_IOVEC_DEFINED";
39 enableParallelBuilding = true;
42 homepage = "http://apr.apache.org/";
43 description = "The Apache Portable Runtime library";
44 platforms = platforms.all;
45 license = licenses.asl20;
46 maintainers = [ maintainers.eelco ];