Merge pull request #144588 from Ma27/grafana-cve-2021-41174

grafana: 8.1.6 -> 8.2.3, fix CVE-2021-41174, enable `buildGo117Module`
This commit is contained in:
Maximilian Bosch 2021-11-11 00:29:41 +01:00 committed by GitHub
commit 236d081ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 14 deletions

View File

@ -1,8 +1,8 @@
{ lib, buildGoModule, fetchurl, fetchFromGitHub, nixosTests, tzdata }: { lib, buildGo117Module, fetchurl, fetchFromGitHub, nixosTests, tzdata, wire }:
buildGoModule rec { buildGo117Module rec {
pname = "grafana"; pname = "grafana";
version = "8.1.6"; version = "8.2.3";
excludedPackages = "\\(alert_webhook_listener\\|clean-swagger\\|release_publisher\\|slow_proxy\\|slow_proxy_mac\\|macaron\\)"; excludedPackages = "\\(alert_webhook_listener\\|clean-swagger\\|release_publisher\\|slow_proxy\\|slow_proxy_mac\\|macaron\\)";
@ -10,17 +10,23 @@ buildGoModule rec {
rev = "v${version}"; rev = "v${version}";
owner = "grafana"; owner = "grafana";
repo = "grafana"; repo = "grafana";
sha256 = "sha256-PUVRFa3b+O2lY6q3vO+rLUcC+fx80iB78tt60f6Vugk="; sha256 = "sha256-GC4pHwthsXu/+dXb1cBk5bC0O6NnyiChC+UWleq7JzA=";
}; };
srcStatic = fetchurl { srcStatic = fetchurl {
url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz"; url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz";
sha256 = "sha256-So9xzet9kPkjcDwNts3iXlCd+u2uiXTo0LVcLc8toyk="; sha256 = "sha256-LOswYw0P3dy6arrmUbnzBU0ie2YcPtk6xqtp9CowG2s=";
}; };
vendorSha256 = "sha256-dn4sliRp58oZALZ8Iu7kE83ntkcMIU84Xr5WoeXlhCI="; vendorSha256 = "sha256-yZbdUiuRNFRaXduOYps5ygiaUgvNXw+Ah4wZrfYcJlY=";
nativeBuildInputs = [ wire ];
preBuild = '' preBuild = ''
# Generate DI code that's required to compile the package.
# From https://github.com/grafana/grafana/blob/v8.2.3/Makefile#L33-L35
wire gen -tags oss ./pkg/server
# The testcase makes an API call against grafana.com: # The testcase makes an API call against grafana.com:
# #
# --- Expected # --- Expected

View File

@ -20262,10 +20262,10 @@ with pkgs;
# across different go versions and/or platforms: # across different go versions and/or platforms:
# https://github.com/NixOS/nixpkgs/issues/144667 # https://github.com/NixOS/nixpkgs/issues/144667
# #
# do not uncomment this without approval from the go CODEOWNERS # That's why `buildGoPackage != buildGo117Package`.
#buildGo117Package = callPackage ../development/go-packages/generic { buildGo117Package = callPackage ../development/go-packages/generic {
# go = buildPackages.go_1_17; go = buildPackages.go_1_17;
#}; };
buildGoPackage = buildGo116Package; buildGoPackage = buildGo116Package;
@ -20279,10 +20279,10 @@ with pkgs;
# across different go versions and/or platforms: # across different go versions and/or platforms:
# https://github.com/NixOS/nixpkgs/issues/144667 # https://github.com/NixOS/nixpkgs/issues/144667
# #
# do not uncomment this without approval from the go CODEOWNERS # That's why `buildGoModule != buildGo117Module`.
#buildGo117Module = callPackage ../development/go-modules/generic { buildGo117Module = callPackage ../development/go-modules/generic {
# go = buildPackages.go_1_17; go = buildPackages.go_1_17;
#}; };
buildGoModule = buildGo116Module; buildGoModule = buildGo116Module;