diff --git a/pkgs/servers/sql/postgresql/8.4.x.nix b/pkgs/servers/sql/postgresql/8.4.x.nix index f946f9fc1459..0254bbe951d6 100644 --- a/pkgs/servers/sql/postgresql/8.4.x.nix +++ b/pkgs/servers/sql/postgresql/8.4.x.nix @@ -8,6 +8,4 @@ callPackage ./generic.nix (args // rec { url = "mirror://postgresql/source/v${version}/postgresql-${version}.tar.bz2"; sha256 = "09iqr9sldiq7jz1rdnywp2wv36lxy5m8kch3vpchd1s4fz75c7aw"; }; - - patches = [ ./disable-resolve_symlinks.patch ]; }) diff --git a/pkgs/servers/sql/postgresql/9.0.x.nix b/pkgs/servers/sql/postgresql/9.0.x.nix index b2a53bfc4b1f..dba42e4fb110 100644 --- a/pkgs/servers/sql/postgresql/9.0.x.nix +++ b/pkgs/servers/sql/postgresql/9.0.x.nix @@ -8,6 +8,4 @@ callPackage ./generic.nix (args // rec { url = "mirror://postgresql/source/v${version}/postgresql-${version}.tar.bz2"; sha256 = "0vxa90d1ghv6vg4c6kxvm2skypahvlq4sd968q7l9ff3dl145z02"; }; - - patches = [ ./disable-resolve_symlinks.patch ]; }) diff --git a/pkgs/servers/sql/postgresql/9.1.x.nix b/pkgs/servers/sql/postgresql/9.1.x.nix index 1debe457e1fd..138bc4a30232 100644 --- a/pkgs/servers/sql/postgresql/9.1.x.nix +++ b/pkgs/servers/sql/postgresql/9.1.x.nix @@ -8,6 +8,4 @@ callPackage ./generic.nix (args // rec { url = "mirror://postgresql/source/v${version}/postgresql-${version}.tar.bz2"; sha256 = "0mllj1r1648iwm0qj3cj9qxizhlyhqmz94iydnwhf48psvvy4r9b"; }; - - patches = [ ./disable-resolve_symlinks.patch ]; }) diff --git a/pkgs/servers/sql/postgresql/9.2.x.nix b/pkgs/servers/sql/postgresql/9.2.x.nix index 477bb9d2484d..9517b4e803cc 100644 --- a/pkgs/servers/sql/postgresql/9.2.x.nix +++ b/pkgs/servers/sql/postgresql/9.2.x.nix @@ -8,6 +8,4 @@ callPackage ./generic.nix (args // rec { url = "mirror://postgresql/source/v${version}/postgresql-${version}.tar.bz2"; sha256 = "1k5i73ninqyz76zzpi06ajj5qawf30zwr16x8wrgq6swzvsgbck5"; }; - - patches = [ ./disable-resolve_symlinks.patch ]; }) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index b7b2e3014ce4..46d2030224d8 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -10,7 +10,7 @@ , walBlockSizeKB ? 8, walSegmentSizeMB ? 16 # Version specific arguments -, psqlSchema , version, src, patches ? [ ] +, psqlSchema , version, src , ... }: @@ -25,8 +25,6 @@ let optLibxml2 = shouldUsePkg libxml2; optLibxslt = shouldUsePkg libxslt; optZlib = shouldUsePkg zlib; - - patches' = [ ./less-is-more.patch ] ++ patches; in with stdenv.lib; stdenv.mkDerivation rec { @@ -34,7 +32,13 @@ stdenv.mkDerivation rec { inherit src; - patches = patches'; + patches = [ + ./less-is-more.patch + ] ++ optionals (versionOlder version "9.4.0") [ + ./disable-resolve_symlinks.patch + ] ++ optionals (versionAtLeast version "9.4.0") [ + ./disable-resolve_symlinks-94.patch + ]; nativeBuildInputs = [ bison flex ]; buildInputs = [