From 9481fdcdfc9fbf45244bf93eec16ba5a1a9ae6e7 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Sun, 17 Apr 2022 12:37:19 -0300 Subject: [PATCH] flyctl: 0.0.316 -> 0.0.320 --- pkgs/development/web/flyctl/default.nix | 29 ++++++++++++++++++------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/web/flyctl/default.nix b/pkgs/development/web/flyctl/default.nix index eaa2afd9cdd76..720467ac4cd5d 100644 --- a/pkgs/development/web/flyctl/default.nix +++ b/pkgs/development/web/flyctl/default.nix @@ -2,29 +2,42 @@ buildGoModule rec { pname = "flyctl"; - version = "0.0.316"; + version = "0.0.320"; src = fetchFromGitHub { owner = "superfly"; repo = "flyctl"; rev = "v${version}"; - sha256 = "sha256-ZIVb4k/KCiHXoEv45lQ2bYAHOXIADCDZOQPeIoMJ8RM="; + sha256 = "sha256-hljQzMdA+dfZDQMqehkdZ1giv56IRygby4UF57Cogq8="; }; - preBuild = '' - go generate ./... - ''; + vendorSha256 = "sha256-8+EYVaWOppzv4bV/rBWyTTdAFSx7QI0a3+oplBglxyQ="; subPackages = [ "." ]; - vendorSha256 = "sha256-D3eYFEib+PoAOfrkDKXEzq9Ivh6ukZcT+eA10z5LHGE="; + ldflags = [ + "-s" "-w" + "-X github.com/superfly/flyctl/flyctl.Commit=${src.rev}" + "-X github.com/superfly/flyctl/flyctl.BuildDate=1970-01-01T00:00:00+0000" + "-X github.com/superfly/flyctl/flyctl.Environment=production" + "-X github.com/superfly/flyctl/flyctl.Version=${version}" + ]; - doCheck = false; + preBuild = '' + go generate ./... + ''; + + preCheck = '' + HOME=$(mktemp -d) + ''; - ldflags = [ "-s" "-w" "-X github.com/superfly/flyctl/flyctl.Version=${version}" "-X github.com/superfly/flyctl/flyctl.Commit=${src.rev}" "-X github.com/superfly/flyctl/flyctl.BuildDate=1970-01-01T00:00:00+0000" "-X github.com/superfly/flyctl/flyctl.Environment=production" ]; + postCheck = '' + go test ./... -ldflags="-X 'github.com/superfly/flyctl/internal/buildinfo.buildDate=1970-01-01T00:00:00+0000'" + ''; meta = with lib; { description = "Command line tools for fly.io services"; + downloadPage = "https://github.com/superfly/flyctl"; homepage = "https://fly.io/"; license = licenses.asl20; maintainers = with maintainers; [ aaronjanse jsierles ];