diff --git a/pkgs-ng/applications/version-management/subversion/builder.sh b/pkgs-ng/applications/version-management/subversion/builder.sh new file mode 100755 index 000000000000..eed57787e011 --- /dev/null +++ b/pkgs-ng/applications/version-management/subversion/builder.sh @@ -0,0 +1,39 @@ +#! /bin/sh + +buildinputs="$openssl $db4 $httpd $swig $libxml2" +. $stdenv/setup || exit 1 + +if test $localServer; then + extraflags="--with-berkeley-db=$db4 $extraflags" +fi + +if test $sslSupport; then + extraflags="--with-ssl --with-libs=$openssl $extraflags" +fi + +if test $httpServer; then + extraflags="--with-apxs=$httpd/bin/apxs --with-apr=$httpd --with-apr-util=$httpd $extraflags" + extramakeflags="APACHE_LIBEXECDIR=$out/modules $extramakeflags" +else + NIX_CFLAGS_COMPILE="-I$expat/include $NIX_CFLAGS_COMPILE" + NIX_CFLAGS_LINK="-L$expat/lib $NIX_CFLAGS_LINK" + NIX_LDFLAGS="-rpath $expat/lib $NIX_LDFLAGS" +fi + +if test $swigBindings; then + extraflags="--with-swig=$swig $extraflags" +fi + +echo "extra flags: $extraflags" + +tar xvfz $src || exit 1 +cd subversion-* || exit 1 +./configure --prefix=$out $extraflags \ + --without-gdbm --disable-static || exit 1 +make $extramakeflags || exit 1 +make install $extramakeflags || exit 1 + +if test $swigBindings; then + make swig-py || exit 1 + make install-swig-py || exit 1 +fi diff --git a/pkgs-ng/applications/version-management/subversion/default.fix b/pkgs-ng/applications/version-management/subversion/default.fix new file mode 100644 index 000000000000..6497c07fc9c4 --- /dev/null +++ b/pkgs-ng/applications/version-management/subversion/default.fix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, openssl, httpd, db4, libxml2, expat, swig +, localServer, httpServer, sslSupport, swigBindings +}: +derivation { + name = "subversion-0.32.1"; + system = stdenv.system; + + builder = ./builder.sh; + src = fetchurl { + url = http://svn.collab.net/tarballs/subversion-0.32.1.tar.gz; + md5 = "b06717a8ef50db4b5c4d380af00bd901"; + }; + + localServer = localServer; + httpServer = httpServer; + sslSupport = httpServer; + swigBindings = httpServer; + + stdenv = stdenv; + libxml2 = libxml2; + openssl = if sslSupport then openssl else ""; + httpd = if httpServer then httpd else ""; + expat = if httpServer then "" else expat; + db4 = if localServer then db4 else ""; + swig = if swigBindings then swig else ""; +} diff --git a/pkgs-ng/system/all-packages-generic.fix b/pkgs-ng/system/all-packages-generic.fix index d31bdb5d4940..4722e6f123bc 100644 --- a/pkgs-ng/system/all-packages-generic.fix +++ b/pkgs-ng/system/all-packages-generic.fix @@ -108,4 +108,19 @@ stdenv = stdenv; }; + # applications/version-management/subversion + subversion = (import ../applications/version-management/subversion) { + fetchurl = fetchurl; + stdenv = stdenv; + localServer = false; + httpServer = false; + sslSupport = false; + swigBindings = false; + openssl = ""; + httpd = ""; + db4 = ""; + libxml2 = ""; + expat = ""; + swig = ""; + }; } diff --git a/pkgs-ng/system/user-environment.fix b/pkgs-ng/system/user-environment.fix index 40e8008281c5..df4ff8b4f79e 100644 --- a/pkgs-ng/system/user-environment.fix +++ b/pkgs-ng/system/user-environment.fix @@ -7,11 +7,15 @@ # All activated packages. pkgs = (import ./all-packages.fix) {system = system}; - # This - selectedPkgs = - [ pkgs.aterm - ]; + # The packages selection for inclusion in the user environment. + # This list should be generated automatically by a package + # management user interface. + selectedPkgs = [ + pkgs.aterm + pkgs.subversion + ]; + # Create a user environment. body = derivation { name = "user-environment"; system = system;