From 56ceaa6c8b0fe45447f9bf85a0d7c373ec29601a Mon Sep 17 00:00:00 2001 From: happysalada Date: Thu, 22 Jul 2021 15:01:13 +0900 Subject: [PATCH] prometheus: nixpkgs-fmt --- .../servers/monitoring/prometheus/default.nix | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix index b87817af439c..6d68b66d2997 100644 --- a/pkgs/servers/monitoring/prometheus/default.nix +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -1,4 +1,10 @@ -{ stdenv, lib, go, buildGoModule, fetchFromGitHub, mkYarnPackage, nixosTests +{ stdenv +, lib +, go +, buildGoModule +, fetchFromGitHub +, mkYarnPackage +, nixosTests , fetchpatch }: @@ -27,7 +33,8 @@ let installPhase = "mv build $out"; distPhase = "true"; }; -in buildGoModule rec { +in +buildGoModule rec { pname = "prometheus"; inherit src version; @@ -41,19 +48,21 @@ in buildGoModule rec { ''; buildFlags = "-tags=builtinassets"; - buildFlagsArray = let - t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; - in [ - '' - -ldflags= - -X ${t}.Version=${version} - -X ${t}.Revision=unknown - -X ${t}.Branch=unknown - -X ${t}.BuildUser=nix@nixpkgs - -X ${t}.BuildDate=unknown - -X ${t}.GoVersion=${lib.getVersion go} - '' - ]; + buildFlagsArray = + let + t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; + in + [ + '' + -ldflags= + -X ${t}.Version=${version} + -X ${t}.Revision=unknown + -X ${t}.Branch=unknown + -X ${t}.BuildUser=nix@nixpkgs + -X ${t}.BuildDate=unknown + -X ${t}.GoVersion=${lib.getVersion go} + '' + ]; # only run this in the real build, not during the vendor build # this should probably be fixed in buildGoModule