@@ -0,0 +1,44 @@
1+{ stdenv, fetchurl, zlib, readline, libossp_uuid }:
2+
3+with stdenv.lib;
4+
5+let version = "9.4.0"; in
6+
7+stdenv.mkDerivation rec {
8+ name = "postgresql-${version}";
9+
10+ src = fetchurl {
11+ url = "mirror://postgresql/source/v${version}/${name}.tar.bz2";
12+ sha256 = "7a35c3cb77532f7b15702e474d7ef02f0f419527ee80a4ca6036fffb551625a5";
13+ };
14+
15+ buildInputs = [ zlib readline ] ++ optionals (!stdenv.isDarwin) [ libossp_uuid ];
16+
17+ enableParallelBuilding = true;
18+
19+ makeFlags = [ "world" ];
20+
21+ configureFlags = optional (!stdenv.isDarwin)
22+ ''
23+ --with-ossp-uuid
24+ '';
25+
26+ patches = [ ./disable-resolve_symlinks-94.patch ./less-is-more.patch ];
27+
28+ installTargets = [ "install-world" ];
29+
30+ LC_ALL = "C";
31+
32+ passthru = {
33+ inherit readline;
34+ psqlSchema = "9.4";
35+ };
36+
37+ meta = {
38+ homepage = http://www.postgresql.org/ ;
39+ description = "A powerful, open source object-relational database system";
40+ license = stdenv.lib.licenses.postgresql;
41+ maintainers = with stdenv.lib.maintainers; [ aristid ocharles ];
42+ hydraPlatforms = stdenv.lib.platforms.linux;
43+ };
44+}