1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 name = "apr-1.6.3";
5
6 src = fetchurl {
7 url = "mirror://apache/apr/${name}.tar.bz2";
8 sha256 = "0wiik6amxn6lkc55fv9yz5i3kbxnqbp36alrzabx1avsdp8hc7qk";
9 };
10
11 patches = stdenv.lib.optionals stdenv.isDarwin [ ./is-this-a-compiler-bug.patch ];
12
13 outputs = [ "out" "dev" ];
14 outputBin = "dev";
15
16 preConfigure =
17 ''
18 configureFlagsArray+=("--with-installbuilddir=$dev/share/build")
19 '';
20
21 configureFlags =
22 # Including the Windows headers breaks unistd.h.
23 # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2
24 stdenv.lib.optional (stdenv.system == "i686-cygwin") "ac_cv_header_windows_h=no";
25
26 enableParallelBuilding = true;
27
28 meta = with stdenv.lib; {
29 homepage = http://apr.apache.org/;
30 description = "The Apache Portable Runtime library";
31 platforms = platforms.all;
32 maintainers = [ maintainers.eelco ];
33 };
34}