2008-06-19 16:29:25 +01:00
|
|
|
{ bdbSupport ? false # build support for Berkeley DB repositories
|
|
|
|
, httpServer ? false # build Apache DAV module
|
|
|
|
, httpSupport ? false # client must support http
|
|
|
|
, sslSupport ? false # client must support https
|
|
|
|
, compressionSupport ? false # client must support http compression
|
|
|
|
, pythonBindings ? false
|
|
|
|
, perlBindings ? false
|
|
|
|
, javahlBindings ? false
|
2012-01-14 11:41:06 +00:00
|
|
|
, saslSupport ? false
|
2009-03-24 10:31:39 +00:00
|
|
|
, stdenv, fetchurl, apr, aprutil, neon, zlib, sqlite
|
2009-10-02 12:49:21 +01:00
|
|
|
, httpd ? null, expat, swig ? null, jdk ? null, python ? null, perl ? null
|
2012-01-14 11:41:06 +00:00
|
|
|
, sasl ? null
|
2008-06-19 16:29:25 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert bdbSupport -> aprutil.bdbSupport;
|
2009-05-12 13:50:07 +01:00
|
|
|
assert httpServer -> httpd != null;
|
2009-10-02 12:49:21 +01:00
|
|
|
assert pythonBindings -> swig != null && python != null;
|
|
|
|
assert javahlBindings -> jdk != null && perl != null;
|
2008-06-19 16:29:25 +01:00
|
|
|
assert sslSupport -> neon.sslSupport;
|
|
|
|
assert compressionSupport -> neon.compressionSupport;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2013-08-07 15:36:36 +01:00
|
|
|
version = "1.7.11";
|
2008-06-19 16:29:25 +01:00
|
|
|
|
|
|
|
name = "subversion-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2011-10-26 16:32:56 +01:00
|
|
|
url = "mirror://apache/subversion//${name}.tar.bz2";
|
2013-08-07 15:36:36 +01:00
|
|
|
sha1 = "d82e187803043b74c072cd5a861ac02e4a027684";
|
2008-06-19 16:29:25 +01:00
|
|
|
};
|
|
|
|
|
2010-04-21 10:47:26 +01:00
|
|
|
buildInputs = [ zlib apr aprutil sqlite ]
|
2008-10-07 00:01:54 +01:00
|
|
|
++ stdenv.lib.optional httpSupport neon
|
2009-10-02 12:49:21 +01:00
|
|
|
++ stdenv.lib.optional pythonBindings python
|
2012-01-14 11:41:06 +00:00
|
|
|
++ stdenv.lib.optional perlBindings perl
|
|
|
|
++ stdenv.lib.optional saslSupport sasl;
|
2008-08-03 13:23:27 +01:00
|
|
|
|
2008-06-19 16:29:25 +01:00
|
|
|
configureFlags = ''
|
|
|
|
${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"}
|
2008-10-06 14:38:45 +01:00
|
|
|
${if httpServer then "--with-apxs=${httpd}/bin/apxs" else "--without-apxs"}
|
2008-06-19 16:29:25 +01:00
|
|
|
${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"}
|
|
|
|
${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""}
|
2010-12-06 18:01:22 +00:00
|
|
|
${if stdenv.isDarwin then "--enable-keychain" else "--disable-keychain"}
|
2012-01-14 12:05:18 +00:00
|
|
|
${if saslSupport then "--enable-sasl --with-sasl=${sasl}" else "--disable-sasl"}
|
2009-07-06 11:39:59 +01:00
|
|
|
--with-zlib=${zlib}
|
|
|
|
--with-sqlite=${sqlite}
|
2008-06-19 16:29:25 +01:00
|
|
|
'';
|
|
|
|
|
2008-10-07 00:01:54 +01:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
|
2013-06-29 23:20:47 +01:00
|
|
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace configure --replace "-no-cpp-precomp" ""
|
2008-10-07 00:01:54 +01:00
|
|
|
'';
|
|
|
|
|
2008-07-07 12:46:50 +01:00
|
|
|
postInstall = ''
|
2009-10-02 12:49:21 +01:00
|
|
|
if test -n "$pythonBindings"; then
|
2008-10-07 00:01:54 +01:00
|
|
|
make swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
|
|
|
|
make install-swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
|
|
|
|
fi
|
2008-10-16 13:42:20 +01:00
|
|
|
|
2009-10-02 12:49:21 +01:00
|
|
|
if test -n "$perlBindings"; then
|
2008-10-07 00:01:54 +01:00
|
|
|
make swig-pl-lib
|
|
|
|
make install-swig-pl-lib
|
|
|
|
cd subversion/bindings/swig/perl/native
|
|
|
|
perl Makefile.PL PREFIX=$out
|
|
|
|
make install
|
|
|
|
cd -
|
|
|
|
fi
|
2010-10-19 18:27:31 +01:00
|
|
|
'';
|
2008-07-07 12:46:50 +01:00
|
|
|
|
2008-10-07 00:01:54 +01:00
|
|
|
inherit perlBindings pythonBindings;
|
2008-06-19 16:29:25 +01:00
|
|
|
|
2010-10-29 15:46:18 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-06-19 16:29:25 +01:00
|
|
|
meta = {
|
|
|
|
description = "A version control system intended to be a compelling replacement for CVS in the open source community";
|
2010-04-21 10:47:26 +01:00
|
|
|
homepage = http://subversion.apache.org/;
|
2013-06-29 23:20:47 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ eelco lovek323 ];
|
2009-10-03 13:48:29 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2008-06-19 16:29:25 +01:00
|
|
|
};
|
|
|
|
}
|