diff --git a/pkgs/development/tools/build-managers/apache-ant/default.nix b/pkgs/development/tools/build-managers/apache-ant/default.nix index 37a5d35586e1..cbedddcee212 100644 --- a/pkgs/development/tools/build-managers/apache-ant/default.nix +++ b/pkgs/development/tools/build-managers/apache-ant/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl, j2sdk, name}: -rec { +let { body = stdenv.mkDerivation { name = name; diff --git a/pkgs/servers/sql/postgresql/builder.sh b/pkgs/servers/sql/postgresql/builder.sh new file mode 100755 index 000000000000..c2e8e8a01f03 --- /dev/null +++ b/pkgs/servers/sql/postgresql/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +configureFlags="" +if test "$jdbcSupport"; then + configureFlags="--with-java $configureFlags" +fi + +genericBuild diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix new file mode 100644 index 000000000000..550cd4739197 --- /dev/null +++ b/pkgs/servers/sql/postgresql/default.nix @@ -0,0 +1,18 @@ +{stdenv, fetchurl, readline, jdbcSupport ? true, ant ? null}: + +assert jdbcSupport -> ant != null; + +stdenv.mkDerivation { + name = "postgresql-7.4.5"; + builder = ./builder.sh; + + src = fetchurl { + url = ftp://ftp2.nl.postgresql.org/mirror/postgresql/latest/postgresql-7.4.5.tar.bz2; + md5 = "97e750c8e69c208b75b6efedc5a36efb"; + }; + + inherit jdbcSupport; + ant = if jdbcSupport then ant else null; + + buildInputs = if jdbcSupport then [ant] else []; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 9e87d814505e..0fb4e26ab0d1 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -325,7 +325,7 @@ rec { jclasslib = (import ../development/tools/java/jclasslib) { inherit fetchurl stdenv xpf; j2re = j2sdk15; - ant = apacheant14.body; + ant = apacheAnt14; }; ocaml = (import ../development/compilers/ocaml) { @@ -405,18 +405,18 @@ rec { inherit fetchurl stdenv jikes alsaLib xlibs; }; - apacheant14 = (import ../development/tools/build-managers/apache-ant) { + apacheAnt14 = (import ../development/tools/build-managers/apache-ant) { inherit fetchurl stdenv j2sdk; name = "ant-j2sdk-1.4.2"; }; - apacheantblackdown14 = (import ../development/tools/build-managers/apache-ant) { + apacheAntBlackdown14 = (import ../development/tools/build-managers/apache-ant) { inherit fetchurl stdenv; j2sdk = blackdown; name = "ant-blackdown-1.4.2"; }; - apacheant15 = (import ../development/tools/build-managers/apache-ant) { + apacheAnt15 = (import ../development/tools/build-managers/apache-ant) { inherit fetchurl stdenv; name = "ant-j2sdk-1.5.0"; j2sdk = j2sdk15; @@ -631,6 +631,12 @@ rec { buildClientLibs = true; }; + postgresql = (import ../servers/sql/postgresql) { + inherit fetchurl stdenv readline; + jdbcSupport = true; + ant = apacheAntBlackdown14; + }; + ### OS-SPECIFIC kernelHeaders = (import ../os-specific/linux/kernel-headers) {