Skip to content

Commit 81ae891

Browse files
committed
refactor: consolidate duplicate version conditions as suggested
1 parent 688283b commit 81ae891

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

nix/ext/wrappers/default.nix

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -67,43 +67,20 @@ let
6767
outputHashes =
6868
if builtins.compareVersions "0.1.11" version >= 0 then
6969
{ "clickhouse-rs-1.0.0-alpha.1" = "sha256-EDMgIpDdkyW3ZG+8LSC4pis8DbHnPIabHRxuc23DPJU="; }
70-
else if builtins.compareVersions "0.3.0" version >= 0 then
71-
{ "clickhouse-rs-1.0.0-alpha.1" = "sha256-0zmoUo/GLyCKDLkpBsnLAyGs1xz6cubJhn+eVqMEMaw="; }
7270
else if builtins.compareVersions "0.4.2" version >= 0 then
7371
{ "clickhouse-rs-1.0.0-alpha.1" = "sha256-0zmoUo/GLyCKDLkpBsnLAyGs1xz6cubJhn+eVqMEMaw="; }
7472
else if builtins.compareVersions "0.5.0" version >= 0 then
7573
{ "clickhouse-rs-1.1.0-alpha.1" = "sha256-G+v4lNP5eK2U45D1fL90Dq24pUSlpIysNCxuZ17eac0="; }
76-
else if builtins.compareVersions "0.5.2" version == 0 then
77-
{
78-
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
79-
"iceberg-catalog-s3tables-0.5.1" = "sha256-1JkB2JExukABlbW1lZPolNQCYb9URi8xNYY3APmiGq0=";
80-
}
81-
else if builtins.compareVersions "0.5.3" version == 0 then
74+
else if
75+
(builtins.compareVersions version "0.5.2" >= 0 && builtins.compareVersions version "0.5.4" <= 0)
76+
then
8277
{
8378
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
8479
"iceberg-catalog-s3tables-0.5.1" = "sha256-1JkB2JExukABlbW1lZPolNQCYb9URi8xNYY3APmiGq0=";
8580
}
86-
else if builtins.compareVersions "0.5.4" version == 0 then
87-
{
88-
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
89-
"iceberg-catalog-s3tables-0.5.1" = "sha256-1JkB2JExukABlbW1lZPolNQCYb9URi8xNYY3APmiGq0=";
90-
}
91-
else if builtins.compareVersions "0.5.4" version == 0 then
92-
{
93-
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
94-
"iceberg-catalog-s3tables-0.5.1" = "sha256-1JkB2JExukABlbW1lZPolNQCYb9URi8xNYY3APmiGq0=";
95-
}
96-
else if builtins.compareVersions "0.5.5" version == 0 then
97-
{
98-
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
99-
"iceberg-catalog-s3tables-0.6.0" = "sha256-AUK7B0wMqQZwJho91woLs8uOC4k1RdUEEN5Khw2OoqQ=";
100-
}
101-
else if builtins.compareVersions "0.5.6" version == 0 then
102-
{
103-
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
104-
"iceberg-catalog-s3tables-0.6.0" = "sha256-AUK7B0wMqQZwJho91woLs8uOC4k1RdUEEN5Khw2OoqQ=";
105-
}
106-
else if builtins.compareVersions "0.5.7" version == 0 then
81+
else if
82+
(builtins.compareVersions version "0.5.5" >= 0 && builtins.compareVersions version "0.5.7" <= 0)
83+
then
10784
{
10885
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
10986
"iceberg-catalog-s3tables-0.6.0" = "sha256-AUK7B0wMqQZwJho91woLs8uOC4k1RdUEEN5Khw2OoqQ=";

0 commit comments

Comments
 (0)