* Converted some more packages.

* Subversion no longer needs libxml2 (just expat).

svn path=/nixpkgs/trunk/; revision=478
This commit is contained in:
Eelco Dolstra 2003-11-05 12:17:48 +00:00
parent 211f1cae14
commit 4cf6ec5ef5
15 changed files with 195 additions and 20 deletions

View file

@ -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

View file

@ -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 "";
}

View file

@ -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

View file

@ -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;
}

View file

@ -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

View file

@ -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;
}

View file

@ -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

View file

@ -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;
}

View file

@ -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

View file

@ -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;
}

View file

@ -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

View file

@ -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;
}

View file

@ -12,4 +12,5 @@
pkgs.binutils
pkgs.gnumake
pkgs.gcc
pkgs.bash
]

View file

@ -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 = "";
};

View file

@ -12,7 +12,7 @@
# management user interface.
selectedPkgs = [
pkgs.aterm
# pkgs.subversion
pkgs.subversion
];
# Create a user environment.