Skip to content

Commit 9f323a1

Browse files
jfrocheyvan-sraka
authored andcommitted
chore(postgresql): add isOrioleDB condition
1 parent bb99e58 commit 9f323a1

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

nix/postgresql/generic.nix

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ let
8181
else
8282
(lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd);
8383

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

8688
stdenv' = if jitSupport then llvmPackages.stdenv else stdenv;
@@ -90,17 +92,11 @@ let
9092
pname = pname + lib.optionalString jitSupport "-jit";
9193

9294
src =
93-
if isOrioleDB then
94-
if revision != null then
95-
fetchurl {
96-
url = "https://github.com/orioledb/postgres/archive/${revision}.tar.gz";
97-
inherit hash;
98-
}
99-
else
100-
fetchurl {
101-
url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz";
102-
inherit hash;
103-
}
95+
if (isOrioleDB) then
96+
fetchurl {
97+
url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz";
98+
inherit hash;
99+
}
104100
else
105101
fetchurl {
106102
url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2";

0 commit comments

Comments
 (0)