From 5837509c6591ad9bbb321a87deff1d4d92f5d11e Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sun, 27 Sep 2020 08:34:59 +1000 Subject: [PATCH] grafana: remove scripts/go to fix go 1.15 build failure Using subPackages to avoid building this directory would be more idiomatic but then we would lose the majority of the go tests. --- pkgs/servers/monitoring/grafana/default.nix | 6 ++++++ pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 975c09225101..ed9c579d9c38 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -25,6 +25,12 @@ buildGoModule rec { --replace 'var version = "5.0.0"' 'var version = "${version}"' ''; + # fixes build failure with go 1.15: + # main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/scripts/go + preBuild = '' + rm -rf scripts/go + ''; + postInstall = '' tar -xvf $srcStatic mkdir -p $out/share/grafana diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f91e7880dbc7..3050898aaf71 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16503,9 +16503,7 @@ in gofish = callPackage ../servers/gopher/gofish { }; - grafana = callPackage ../servers/monitoring/grafana { - buildGoModule = buildGo114Module; - }; + grafana = callPackage ../servers/monitoring/grafana { }; grafana-loki = callPackage ../servers/monitoring/loki { buildGoPackage = buildGo114Package;