My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/web/flyctl/default.nix

45 lines
1.2 KiB

{ buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "flyctl";
version = "0.0.323";
src = fetchFromGitHub {
owner = "superfly";
repo = "flyctl";
rev = "v${version}";
sha256 = "sha256-7mPZ4p7fb49Lc+sx7/jEw+oFdFaYtEJcSzFS5haC6NM=";
};
vendorSha256 = "sha256-dTeFeDdT44k1HxIEuvTU/A8xAa1VhVv4ZFbvg1PagPw=";
subPackages = [ "." ];
ldflags = [
"-s" "-w"
"-X github.com/superfly/flyctl/internal/buildinfo.commit=${src.rev}"
"-X github.com/superfly/flyctl/internal/buildinfo.buildDate=1970-01-01T00:00:00Z"
"-X github.com/superfly/flyctl/internal/buildinfo.environment=production"
"-X github.com/superfly/flyctl/internal/buildinfo.version=${version}"
];
preBuild = ''
go generate ./...
'';
preCheck = ''
HOME=$(mktemp -d)
'';
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 techknowlogick ];
};
}