zabbix: move vendorSha256 to versions.nix

This commit is contained in:
schnusch 2021-11-11 21:29:43 +01:00 committed by Andreas Wolf
parent 8dd82f3f41
commit a4fc9696da
No known key found for this signature in database
GPG Key ID: 573454D3C0761E31
5 changed files with 6 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, pkg-config, libiconv, openssl, pcre }:
import ./versions.nix ({ version, sha256 }:
import ./versions.nix ({ version, sha256, ... }:
stdenv.mkDerivation {
pname = "zabbix-agent";
inherit version;

View File

@ -1,6 +1,6 @@
{ lib, buildGoModule, fetchurl, autoreconfHook, pkg-config, libiconv, openssl, pcre, zlib }:
import ./versions.nix ({ version, sha256 }:
import ./versions.nix ({ version, sha256, vendorSha256 ? throw "unsupported version ${version} for zabbix-agent2", ... }:
buildGoModule {
pname = "zabbix-agent2";
inherit version;
@ -12,10 +12,7 @@ import ./versions.nix ({ version, sha256 }:
modRoot = "src/go";
vendorSha256 =
if "${lib.versions.majorMinor version}" == "5.0" then "1417qi061xc4m55z0vz420fr7qpi24kw5yj9wq7iic92smakgkjn"
else if "${lib.versions.majorMinor version}" == "6.0" then "sha256-W95Z9pIhd5MQJAGn94kiVbQVFkmvjGPWfMx4JyJ2/EU="
else throw "unsupported version ${version} for zabbix-agent2";
inherit vendorSha256;
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ libiconv openssl pcre zlib ];

View File

@ -15,7 +15,7 @@ assert sqliteSupport -> !mysqlSupport && !postgresqlSupport;
let
inherit (lib) optional optionalString;
in
import ./versions.nix ({ version, sha256 }:
import ./versions.nix ({ version, sha256, ... }:
stdenv.mkDerivation {
pname = "zabbix-proxy";
inherit version;

View File

@ -16,7 +16,7 @@ assert postgresqlSupport -> !mysqlSupport;
let
inherit (lib) optional optionalString;
in
import ./versions.nix ({ version, sha256 }:
import ./versions.nix ({ version, sha256, ... }:
stdenv.mkDerivation {
pname = "zabbix-server";
inherit version;

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, writeText }:
import ./versions.nix ({ version, sha256 }:
import ./versions.nix ({ version, sha256, ... }:
stdenv.mkDerivation rec {
pname = "zabbix-web";
inherit version;