2008-06-19 17:29:25 +02:00
|
|
|
{ bdbSupport ? false # build support for Berkeley DB repositories
|
|
|
|
, httpServer ? false # build Apache DAV module
|
|
|
|
, httpSupport ? false # client must support http
|
|
|
|
, pythonBindings ? false
|
|
|
|
, perlBindings ? false
|
|
|
|
, javahlBindings ? false
|
2012-01-14 12:41:06 +01:00
|
|
|
, saslSupport ? false
|
2013-12-31 14:55:34 +01:00
|
|
|
, stdenv, fetchurl, apr, aprutil, zlib, sqlite
|
2014-11-07 11:55:49 +01:00
|
|
|
, apacheHttpd ? null, expat, swig ? null, jdk ? null, python ? null, perl ? null
|
2013-12-30 20:32:53 +01:00
|
|
|
, sasl ? null, serf ? null
|
2008-06-19 17:29:25 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert bdbSupport -> aprutil.bdbSupport;
|
2014-11-07 11:55:49 +01:00
|
|
|
assert httpServer -> apacheHttpd != null;
|
2009-10-02 13:49:21 +02:00
|
|
|
assert pythonBindings -> swig != null && python != null;
|
|
|
|
assert javahlBindings -> jdk != null && perl != null;
|
2008-06-19 17:29:25 +02:00
|
|
|
|
2015-01-02 21:40:31 +01:00
|
|
|
stdenv.mkDerivation (rec {
|
2008-06-19 17:29:25 +02:00
|
|
|
|
2015-04-09 15:35:27 +02:00
|
|
|
version = "1.8.13";
|
2008-06-19 17:29:25 +02:00
|
|
|
|
|
|
|
name = "subversion-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2013-12-29 18:32:26 +01:00
|
|
|
url = "mirror://apache/subversion/${name}.tar.bz2";
|
2015-04-09 15:35:27 +02:00
|
|
|
sha1 = "aa0bd14ac6a8f0fb178cc9ff325387de01cd7452";
|
2008-06-19 17:29:25 +02:00
|
|
|
};
|
|
|
|
|
2010-04-21 11:47:26 +02:00
|
|
|
buildInputs = [ zlib apr aprutil sqlite ]
|
2013-12-30 20:32:53 +01:00
|
|
|
++ stdenv.lib.optional httpSupport serf
|
2009-10-02 13:49:21 +02:00
|
|
|
++ stdenv.lib.optional pythonBindings python
|
2012-01-14 12:41:06 +01:00
|
|
|
++ stdenv.lib.optional perlBindings perl
|
|
|
|
++ stdenv.lib.optional saslSupport sasl;
|
2008-08-03 14:23:27 +02:00
|
|
|
|
2008-06-19 17:29:25 +02:00
|
|
|
configureFlags = ''
|
|
|
|
${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"}
|
2014-11-07 11:55:49 +01:00
|
|
|
${if httpServer then "--with-apxs=${apacheHttpd}/bin/apxs" else "--without-apxs"}
|
2008-06-19 17:29:25 +02:00
|
|
|
${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"}
|
|
|
|
${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""}
|
2015-06-23 02:00:15 +02:00
|
|
|
--disable-keychain
|
2014-09-24 18:51:29 +02:00
|
|
|
${if saslSupport then "--with-sasl=${sasl}" else "--without-sasl"}
|
|
|
|
${if httpSupport then "--with-serf=${serf}" else "--without-serf"}
|
2009-07-06 12:39:59 +02:00
|
|
|
--with-zlib=${zlib}
|
|
|
|
--with-sqlite=${sqlite}
|
2008-06-19 17:29:25 +02:00
|
|
|
'';
|
|
|
|
|
2008-10-07 01:01:54 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
|
|
|
|
'';
|
|
|
|
|
2008-07-07 13:46:50 +02:00
|
|
|
postInstall = ''
|
2009-10-02 13:49:21 +02:00
|
|
|
if test -n "$pythonBindings"; then
|
2008-10-07 01:01:54 +02: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 14:42:20 +02:00
|
|
|
|
2009-10-02 13:49:21 +02:00
|
|
|
if test -n "$perlBindings"; then
|
2008-10-07 01:01:54 +02: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
|
2013-11-09 19:19:13 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/bash-completion/completions
|
|
|
|
cp tools/client-side/bash_completion $out/share/bash-completion/completions/subversion
|
2010-10-19 19:27:31 +02:00
|
|
|
'';
|
2008-07-07 13:46:50 +02:00
|
|
|
|
2008-10-07 01:01:54 +02:00
|
|
|
inherit perlBindings pythonBindings;
|
2008-06-19 17:29:25 +02:00
|
|
|
|
2010-10-29 16:46:18 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-06-19 17:29:25 +02:00
|
|
|
meta = {
|
|
|
|
description = "A version control system intended to be a compelling replacement for CVS in the open source community";
|
2010-04-21 11:47:26 +02:00
|
|
|
homepage = http://subversion.apache.org/;
|
2013-06-30 00:20:47 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ eelco lovek323 ];
|
2014-01-22 12:44:49 +01:00
|
|
|
hydraPlatforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
2008-06-19 17:29:25 +02:00
|
|
|
};
|
2015-01-02 21:40:31 +01:00
|
|
|
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
|
|
|
|
CXX = "clang++";
|
|
|
|
CC = "clang";
|
|
|
|
CPP = "clang -E";
|
|
|
|
CXXCPP = "clang++ -E";
|
|
|
|
})
|