Skip to content

Commit

Permalink
Merge pull request NixOS#169064 from superherointj/package-flyctl-0.0…
Browse files Browse the repository at this point in the history
….320

flyctl: 0.0.316 -> 0.0.320
  • Loading branch information
SuperSandro2000 authored Apr 19, 2022
2 parents 7dcfa05 + 9481fdc commit e22337c
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions pkgs/development/web/flyctl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down

0 comments on commit e22337c

Please sign in to comment.