From 4cf6ec5ef5cf89ec4eb278c5c6747c40ac87ed39 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Nov 2003 12:17:48 +0000 Subject: [PATCH] * Converted some more packages. * Subversion no longer needs libxml2 (just expat). svn path=/nixpkgs/trunk/; revision=478 --- .../version-management/subversion/builder.sh | 6 +-- .../version-management/subversion/default.fix | 9 ++-- .../development/interpreters/perl/builder.sh | 26 ++++++++++ .../development/interpreters/perl/default.fix | 10 ++++ pkgs-ng/development/libraries/db4/builder.sh | 10 ++++ pkgs-ng/development/libraries/db4/default.fix | 10 ++++ .../development/libraries/expat/builder.sh | 10 ++++ .../development/libraries/expat/default.fix | 10 ++++ .../development/libraries/openssl/builder.sh | 16 ++++++ .../development/libraries/openssl/default.fix | 11 ++++ pkgs-ng/servers/http/apache-httpd/builder.sh | 23 ++++++++ pkgs-ng/servers/http/apache-httpd/default.fix | 19 +++++++ pkgs-ng/stdenv/nix/path.fix | 1 + pkgs-ng/system/all-packages-generic.fix | 52 +++++++++++++++---- pkgs-ng/system/user-environment.fix | 2 +- 15 files changed, 195 insertions(+), 20 deletions(-) create mode 100755 pkgs-ng/development/interpreters/perl/builder.sh create mode 100644 pkgs-ng/development/interpreters/perl/default.fix create mode 100755 pkgs-ng/development/libraries/db4/builder.sh create mode 100644 pkgs-ng/development/libraries/db4/default.fix create mode 100755 pkgs-ng/development/libraries/expat/builder.sh create mode 100644 pkgs-ng/development/libraries/expat/default.fix create mode 100755 pkgs-ng/development/libraries/openssl/builder.sh create mode 100644 pkgs-ng/development/libraries/openssl/default.fix create mode 100755 pkgs-ng/servers/http/apache-httpd/builder.sh create mode 100644 pkgs-ng/servers/http/apache-httpd/default.fix diff --git a/pkgs-ng/applications/version-management/subversion/builder.sh b/pkgs-ng/applications/version-management/subversion/builder.sh index eed57787e011..72848c795322 100755 --- a/pkgs-ng/applications/version-management/subversion/builder.sh +++ b/pkgs-ng/applications/version-management/subversion/builder.sh @@ -1,6 +1,6 @@ #! /bin/sh -buildinputs="$openssl $db4 $httpd $swig $libxml2" +buildinputs="$openssl $db4 $httpd $swig $expat" . $stdenv/setup || exit 1 if test $localServer; then @@ -14,10 +14,6 @@ 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 diff --git a/pkgs-ng/applications/version-management/subversion/default.fix b/pkgs-ng/applications/version-management/subversion/default.fix index 6497c07fc9c4..853cb0d90142 100644 --- a/pkgs-ng/applications/version-management/subversion/default.fix +++ b/pkgs-ng/applications/version-management/subversion/default.fix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, httpd, db4, libxml2, expat, swig +{ stdenv, fetchurl, openssl, httpd, db4, expat, swig , localServer, httpServer, sslSupport, swigBindings }: derivation { @@ -13,14 +13,13 @@ derivation { localServer = localServer; httpServer = httpServer; - sslSupport = httpServer; - swigBindings = httpServer; + sslSupport = sslSupport; + swigBindings = swigBindings; stdenv = stdenv; - libxml2 = libxml2; openssl = if sslSupport then openssl else ""; httpd = if httpServer then httpd else ""; - expat = if httpServer then "" else expat; + expat = expat; db4 = if localServer then db4 else ""; swig = if swigBindings then swig else ""; } diff --git a/pkgs-ng/development/interpreters/perl/builder.sh b/pkgs-ng/development/interpreters/perl/builder.sh new file mode 100755 index 000000000000..7a925e6dbfd8 --- /dev/null +++ b/pkgs-ng/development/interpreters/perl/builder.sh @@ -0,0 +1,26 @@ +#! /bin/sh + +. $stdenv/setup || exit 1 + +tar xvfz $src || exit 1 +cd perl-* || exit 1 + +# Perl's Configure messes with PATH. We can't have that, so we patch it. +# Yeah, this is an ugly hack. +cat Configure | \ + grep -v '^paths=' | \ + grep -v '^locincpth=' | \ + grep -v '^xlibpth=' | \ + grep -v '^glibpth=' | \ + grep -v '^loclibpth=' | \ + grep -v '^locincpth=' | \ + cat > Configure.tmp || exit 1 +mv Configure.tmp Configure || exit 1 +chmod +x Configure || exit 1 + +./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl \ + -Dlocincpth="$NIX_LIBC_INCLUDES" \ + -Dloclibpth="$NIX_LIBC_LIBS" \ + || exit 1 +make || exit 1 +make install || exit 1 diff --git a/pkgs-ng/development/interpreters/perl/default.fix b/pkgs-ng/development/interpreters/perl/default.fix new file mode 100644 index 000000000000..8d9fa7f610d3 --- /dev/null +++ b/pkgs-ng/development/interpreters/perl/default.fix @@ -0,0 +1,10 @@ +{stdenv, fetchurl}: derivation { + name = "perl-5.8.0"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = ftp://ftp.cs.uu.nl/mirror/CPAN/src/5.0/perl-5.8.1.tar.gz; + md5 = "87cf132f1fbf23e780f0b218046438a6"; + }; + stdenv = stdenv; +} diff --git a/pkgs-ng/development/libraries/db4/builder.sh b/pkgs-ng/development/libraries/db4/builder.sh new file mode 100755 index 000000000000..f32e4ec50dd3 --- /dev/null +++ b/pkgs-ng/development/libraries/db4/builder.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. $stdenv/setup || exit 1 + +tar xvfz $src || exit 1 +cd db-*/build_unix || exit 1 +../dist/configure --prefix=$out --enable-cxx --enable-compat185 || exit 1 +make || exit 1 +make install || exit 1 +rm -rf $out/doc || exit 1 diff --git a/pkgs-ng/development/libraries/db4/default.fix b/pkgs-ng/development/libraries/db4/default.fix new file mode 100644 index 000000000000..a0a8b3653a0d --- /dev/null +++ b/pkgs-ng/development/libraries/db4/default.fix @@ -0,0 +1,10 @@ +{stdenv, fetchurl}: derivation { + name = "db4-4.0.14"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://www.sleepycat.com/update/snapshot/db-4.0.14.tar.gz; + md5 = "12262c64fcd64b772e7cffad8e4d0ebc"; + }; + stdenv = stdenv; +} diff --git a/pkgs-ng/development/libraries/expat/builder.sh b/pkgs-ng/development/libraries/expat/builder.sh new file mode 100755 index 000000000000..c5ca8edfb92f --- /dev/null +++ b/pkgs-ng/development/libraries/expat/builder.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. $stdenv/setup || exit 1 + +tar xvfz $src || exit 1 +cd expat-* || exit 1 +./configure --prefix=$out || exit 1 +make || exit 1 +make install || exit 1 +strip -S $out/lib/*.a || exit 1 diff --git a/pkgs-ng/development/libraries/expat/default.fix b/pkgs-ng/development/libraries/expat/default.fix new file mode 100644 index 000000000000..7506c0b19d2e --- /dev/null +++ b/pkgs-ng/development/libraries/expat/default.fix @@ -0,0 +1,10 @@ +{stdenv, fetchurl}: derivation { + name = "expat-1.95.7"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://heanet.dl.sourceforge.net/sourceforge/expat/expat-1.95.7.tar.gz; + md5 = "2ff59c2a5cbdd21a285c5f343e214fa9"; + }; + stdenv = stdenv; +} diff --git a/pkgs-ng/development/libraries/openssl/builder.sh b/pkgs-ng/development/libraries/openssl/builder.sh new file mode 100755 index 000000000000..c1493365ae6c --- /dev/null +++ b/pkgs-ng/development/libraries/openssl/builder.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +. $stdenv/setup || exit 1 +export PATH=$perl/bin:$PATH + +tar xvfz $src || exit 1 +cd openssl-* || exit 1 +./config --prefix=$out shared || exit 1 +make || exit 1 +mkdir $out || exit 1 +make install || exit 1 + +# Bug fix: openssl does a `chmod 644' on the pkgconfig directory. +chmod 755 $out/lib/pkgconfig || exit 1 + +echo $envpkgs > $out/envpkgs || exit 1 diff --git a/pkgs-ng/development/libraries/openssl/default.fix b/pkgs-ng/development/libraries/openssl/default.fix new file mode 100644 index 000000000000..38bf22cb0bfd --- /dev/null +++ b/pkgs-ng/development/libraries/openssl/default.fix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, perl}: derivation { + name = "openssl-0.9.7c"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://www.openssl.org/source/openssl-0.9.7c.tar.gz; + md5 = "c54fb36218adaaaba01ef733cd88c8ec"; + }; + stdenv = stdenv; + perl = perl; +} diff --git a/pkgs-ng/servers/http/apache-httpd/builder.sh b/pkgs-ng/servers/http/apache-httpd/builder.sh new file mode 100755 index 000000000000..559c75d0124f --- /dev/null +++ b/pkgs-ng/servers/http/apache-httpd/builder.sh @@ -0,0 +1,23 @@ +#! /bin/sh + +buildinputs="$openssl $db4 $expat $perl" +. $stdenv/setup || exit 1 + +if test $db4Support; then + extraflags="--with-berkeley-db=$db4 $extraflags" +fi + +if test $sslSupport; then + extraflags="--enable-ssl --with-ssl=$openssl $extraflags" +fi + +tar xvfz $src || exit 1 +cd httpd-* || exit 1 +./configure --prefix=$out \ + --with-expat=$expat --enable-mods-shared=all --without-gdbm \ + --enable-threads --with-devrandom=/dev/urandom \ + $extraflags || exit 1 +make || exit 1 +make install || exit 1 +strip -S $out/lib/*.a || exit 1 +rm -rf $out/manual || exit 1 diff --git a/pkgs-ng/servers/http/apache-httpd/default.fix b/pkgs-ng/servers/http/apache-httpd/default.fix new file mode 100644 index 000000000000..e188b711563e --- /dev/null +++ b/pkgs-ng/servers/http/apache-httpd/default.fix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl, openssl, db4, expat, perl +, sslSupport, db4Support +}: +derivation { + name = "apache-httpd-2.0.48"; + system = stdenv.system; + + builder = ./builder.sh; + src = fetchurl { + url = ftp://ftp.cs.uu.nl/mirror/apache.org/dist/httpd/httpd-2.0.48.tar.gz; + md5 = "466c63bb71b710d20a5c353df8c1a19c"; + }; + + stdenv = stdenv; + perl = perl; + openssl = if sslSupport then openssl else ""; + db4 = if db4Support then db4 else ""; + expat = expat; +} diff --git a/pkgs-ng/stdenv/nix/path.fix b/pkgs-ng/stdenv/nix/path.fix index 7a801856a7f6..b3348cb0f350 100644 --- a/pkgs-ng/stdenv/nix/path.fix +++ b/pkgs-ng/stdenv/nix/path.fix @@ -12,4 +12,5 @@ pkgs.binutils pkgs.gnumake pkgs.gcc + pkgs.bash ] diff --git a/pkgs-ng/system/all-packages-generic.fix b/pkgs-ng/system/all-packages-generic.fix index 57d416bf82e7..dd4a3a9d4435 100644 --- a/pkgs-ng/system/all-packages-generic.fix +++ b/pkgs-ng/system/all-packages-generic.fix @@ -91,6 +91,11 @@ binutils = binutils; }; + perl = (import ../development/interpreters/perl) { + fetchurl = fetchurl; + stdenv = stdenv; + }; + pcre = (import ../development/libraries/pcre) { fetchurl = fetchurl; stdenv = stdenv; @@ -107,8 +112,38 @@ stdenv = stdenv; }; + expat = (import ../development/libraries/expat) { + fetchurl = fetchurl; + stdenv = stdenv; + }; -### OS-SPECIFIC + db4 = (import ../development/libraries/db4) { + fetchurl = fetchurl; + stdenv = stdenv; + }; + + openssl = (import ../development/libraries/openssl) { + fetchurl = fetchurl; + stdenv = stdenv; + perl = perl; + }; + + + ### SERVERS + + apacheHttpd = (import ../servers/http/apache-httpd) { + fetchurl = fetchurl; + stdenv = stdenv; + sslSupport = true; + db4Support = true; + perl = perl; + openssl = openssl; + db4 = db4; + expat = expat; + }; + + + ### OS-SPECIFIC kernelHeaders = (import ../os-specific/linux/kernel-headers) { fetchurl = fetchurl; @@ -116,20 +151,19 @@ }; -### APPLICATIONS + ### APPLICATIONS subversion = (import ../applications/version-management/subversion) { fetchurl = fetchurl; stdenv = stdenv; - localServer = false; + localServer = true; httpServer = false; - sslSupport = false; + sslSupport = true; swigBindings = false; - openssl = ""; - httpd = ""; - db4 = ""; - libxml2 = ""; - expat = ""; + openssl = openssl; + httpd = apacheHttpd; + db4 = db4; + expat = expat; swig = ""; }; diff --git a/pkgs-ng/system/user-environment.fix b/pkgs-ng/system/user-environment.fix index 942d0a4fefad..df4ff8b4f79e 100644 --- a/pkgs-ng/system/user-environment.fix +++ b/pkgs-ng/system/user-environment.fix @@ -12,7 +12,7 @@ # management user interface. selectedPkgs = [ pkgs.aterm -# pkgs.subversion + pkgs.subversion ]; # Create a user environment.