From 0c9a754a6ccac679c69fc433816a4d8730bd241d Mon Sep 17 00:00:00 2001 From: Matthias Treydte Date: Fri, 13 May 2022 15:59:12 +0200 Subject: [PATCH] prometheus: fix build when all service discovery plugins are disabled Since c6fae8bb0e343c067643f49feb5994102b615597, when all discovery plugins are disabled, the postPatch phase contains shell code like > ( ) > plugins.yml which is invalid syntax. So make sure there's always at least one statement for the subshell, giving the expected empty file. --- pkgs/servers/monitoring/prometheus/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix index 62cb43abefa..4b79103d7d5 100644 --- a/pkgs/servers/monitoring/prometheus/default.nix +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -55,6 +55,7 @@ buildGoModule rec { # Enable only select service discovery to shrink binaries. ( + true # prevent bash syntax error when all plugins are disabled ${lib.optionalString (enableAWS) "echo - github.com/prometheus/prometheus/discovery/aws"} ${lib.optionalString (enableAzure)