Skip to content

Commit fcc4b08

Browse files
jfrochesamrose
authored andcommitted
chore(postgresql): add isOrioleDB condition
1 parent 6094b00 commit fcc4b08

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
@@ -80,6 +80,8 @@ let
8080
else
8181
(lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd);
8282

83+
isOrioleDB = (builtins.match "[0-9][0-9]_.*" version) != null;
84+
8385
pname = "postgresql";
8486

8587
stdenv' = if jitSupport then llvmPackages.stdenv else stdenv;
@@ -89,7 +91,7 @@ let
8991
pname = pname + lib.optionalString jitSupport "-jit";
9092

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

141140
nativeBuildInputs =
142141
[

0 commit comments

Comments
 (0)