From d0dec918b5168334053bdd40122a09988eadb287 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 6 Apr 2022 11:32:16 +0200 Subject: [PATCH] cassandra*: Refactor: store versions in JSON --- pkgs/servers/nosql/cassandra/2.1.json | 4 ++++ pkgs/servers/nosql/cassandra/2.1.nix | 19 ++++++++++--------- pkgs/servers/nosql/cassandra/2.2.json | 4 ++++ pkgs/servers/nosql/cassandra/2.2.nix | 19 ++++++++++--------- pkgs/servers/nosql/cassandra/3.0.json | 4 ++++ pkgs/servers/nosql/cassandra/3.0.nix | 11 ++++++----- pkgs/servers/nosql/cassandra/3.11.json | 4 ++++ pkgs/servers/nosql/cassandra/3.11.nix | 11 ++++++----- 8 files changed, 48 insertions(+), 28 deletions(-) create mode 100644 pkgs/servers/nosql/cassandra/2.1.json create mode 100644 pkgs/servers/nosql/cassandra/2.2.json create mode 100644 pkgs/servers/nosql/cassandra/3.0.json create mode 100644 pkgs/servers/nosql/cassandra/3.11.json diff --git a/pkgs/servers/nosql/cassandra/2.1.json b/pkgs/servers/nosql/cassandra/2.1.json new file mode 100644 index 000000000000..d1af24106b69 --- /dev/null +++ b/pkgs/servers/nosql/cassandra/2.1.json @@ -0,0 +1,4 @@ +{ + "version": "2.1.22", + "sha256": "1wk57dz0kmc6d5y8d8dkx269lzh3ark3751z734gxncwdlclcyz3" +} diff --git a/pkgs/servers/nosql/cassandra/2.1.nix b/pkgs/servers/nosql/cassandra/2.1.nix index 63d89a29d13f..02f954ebd1fe 100644 --- a/pkgs/servers/nosql/cassandra/2.1.nix +++ b/pkgs/servers/nosql/cassandra/2.1.nix @@ -1,11 +1,12 @@ { callPackage, ... } @ args: -callPackage ./generic.nix (args // { - version = "2.1.22"; - sha256 = "1wk57dz0kmc6d5y8d8dkx269lzh3ark3751z734gxncwdlclcyz3"; - generation = "2_1"; - extraMeta.knownVulnerabilities = [ - # Fixed in 3.* but 2.* hasn't been released since - "CVE-2020-17516" - ]; -}) +callPackage ./generic.nix ( + args + // builtins.fromJSON (builtins.readFile ./2.1.json) + // { + generation = "2_1"; + extraMeta.knownVulnerabilities = [ + # Fixed in 3.* but 2.* hasn't been released since + "CVE-2020-17516" + ]; + }) diff --git a/pkgs/servers/nosql/cassandra/2.2.json b/pkgs/servers/nosql/cassandra/2.2.json new file mode 100644 index 000000000000..694e66f4f463 --- /dev/null +++ b/pkgs/servers/nosql/cassandra/2.2.json @@ -0,0 +1,4 @@ +{ + "version": "2.2.14", + "sha256": "1b2x3q1ach44qg07sh8wr7d8a10n36w5522drd3p35djbiwa3d9q" +} diff --git a/pkgs/servers/nosql/cassandra/2.2.nix b/pkgs/servers/nosql/cassandra/2.2.nix index dc04c374b3d5..bcb2eaec123c 100644 --- a/pkgs/servers/nosql/cassandra/2.2.nix +++ b/pkgs/servers/nosql/cassandra/2.2.nix @@ -1,11 +1,12 @@ { callPackage, ... } @ args: -callPackage ./generic.nix (args // { - version = "2.2.14"; - sha256 = "1b2x3q1ach44qg07sh8wr7d8a10n36w5522drd3p35djbiwa3d9q"; - generation = "2_2"; - extraMeta.knownVulnerabilities = [ - # Fixed in 3.* but 2.* hasn't been released since - "CVE-2020-17516" - ]; -}) +callPackage ./generic.nix ( + args + // builtins.fromJSON (builtins.readFile ./2.2.json) + // { + generation = "2_2"; + extraMeta.knownVulnerabilities = [ + # Fixed in 3.* but 2.* hasn't been released since + "CVE-2020-17516" + ]; + }) diff --git a/pkgs/servers/nosql/cassandra/3.0.json b/pkgs/servers/nosql/cassandra/3.0.json new file mode 100644 index 000000000000..665a5604d773 --- /dev/null +++ b/pkgs/servers/nosql/cassandra/3.0.json @@ -0,0 +1,4 @@ +{ + "version": "3.0.26", + "sha256": "09wim1w2yizcqpja62jk64fhaw3jgnrgrjlrm4kgmcc3g3bsmw6i" +} diff --git a/pkgs/servers/nosql/cassandra/3.0.nix b/pkgs/servers/nosql/cassandra/3.0.nix index df484778740d..9c62901a4808 100644 --- a/pkgs/servers/nosql/cassandra/3.0.nix +++ b/pkgs/servers/nosql/cassandra/3.0.nix @@ -1,6 +1,7 @@ { callPackage, ... } @ args: -callPackage ./generic.nix (args // { - version = "3.0.26"; - sha256 = "09wim1w2yizcqpja62jk64fhaw3jgnrgrjlrm4kgmcc3g3bsmw6i"; - generation = "3_0"; -}) +callPackage ./generic.nix ( + args + // builtins.fromJSON (builtins.readFile ./3.0.json) + // { + generation = "3_0"; + }) diff --git a/pkgs/servers/nosql/cassandra/3.11.json b/pkgs/servers/nosql/cassandra/3.11.json new file mode 100644 index 000000000000..e47f78b7baf8 --- /dev/null +++ b/pkgs/servers/nosql/cassandra/3.11.json @@ -0,0 +1,4 @@ +{ + "version": "3.11.12", + "sha256": "16j58l7r47qrfh8q7fm92y935ykgvnbj3qn984c42qda15x92hkw" +} diff --git a/pkgs/servers/nosql/cassandra/3.11.nix b/pkgs/servers/nosql/cassandra/3.11.nix index 838ece0e8a6c..ffb29743405b 100644 --- a/pkgs/servers/nosql/cassandra/3.11.nix +++ b/pkgs/servers/nosql/cassandra/3.11.nix @@ -1,6 +1,7 @@ { callPackage, ... } @ args: -callPackage ./generic.nix (args // { - version = "3.11.12"; - sha256 = "16j58l7r47qrfh8q7fm92y935ykgvnbj3qn984c42qda15x92hkw"; - generation = "3_11"; -}) +callPackage ./generic.nix ( + args + // builtins.fromJSON (builtins.readFile ./3.11.json) + // { + generation = "3_11"; + })