Skip to content

Commit 6c8ab8f

Browse files
committed
chore(postgresql): add isOrioleDB condition
1 parent c5fae77 commit 6c8ab8f

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

nix/postgresql/generic.nix

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ let
7878
else
7979
(lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd);
8080

81+
isOrioleDB = (builtins.match "[0-9][0-9]_.*" version) != null;
82+
8183
pname = "postgresql";
8284

8385
stdenv' = if jitSupport then llvmPackages.stdenv else stdenv;
@@ -87,7 +89,7 @@ let
8789
pname = pname + lib.optionalString jitSupport "-jit";
8890

8991
src =
90-
if (builtins.match "[0-9][0-9]_.*" version != null) then
92+
if (isOrioleDB) then
9193
fetchurl {
9294
url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz";
9395
inherit hash;
@@ -123,18 +125,15 @@ let
123125
++ lib.optionals gssSupport [ libkrb5 ]
124126
++ lib.optionals stdenv'.isLinux [ linux-pam ]
125127
++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ]
126-
++
127-
lib.optionals
128-
((builtins.match "[0-9][0-9]_.*" version != null) || (lib.versionAtLeast version "17"))
129-
[
130-
perl
131-
bison
132-
flex
133-
docbook_xsl
134-
docbook_xml_dtd_45
135-
docbook_xsl_ns
136-
libxslt
137-
];
128+
++ lib.optionals (isOrioleDB || (lib.versionAtLeast version "17")) [
129+
perl
130+
bison
131+
flex
132+
docbook_xsl
133+
docbook_xml_dtd_45
134+
docbook_xsl_ns
135+
libxslt
136+
];
138137

139138
nativeBuildInputs =
140139
[

0 commit comments

Comments
 (0)