2021-10-28 06:52:43 +00:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub }:
|
|
|
|
let
|
|
|
|
faasPlatform = platform:
|
|
|
|
let cpuName = platform.parsed.cpu.name; in {
|
|
|
|
"aarch64" = "arm64";
|
|
|
|
"armv7l" = "armhf";
|
2021-12-06 16:07:01 +00:00
|
|
|
"armv6l" = "armhf";
|
2021-10-28 06:52:43 +00:00
|
|
|
}.${cpuName} or cpuName;
|
|
|
|
in
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "faas-cli";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "0.14.4";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openfaas";
|
|
|
|
repo = "faas-cli";
|
|
|
|
rev = version;
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-hpQn1lEJP0FmU1jhmXDgV/11RbMdEqblLPIrTQLKLOc=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
2022-03-30 09:31:56 +00:00
|
|
|
"-X github.com/openfaas/faas-cli/version.GitCommit=ref/tags/${version}"
|
2021-10-28 06:52:43 +00:00
|
|
|
"-X github.com/openfaas/faas-cli/version.Version=${version}"
|
2021-12-06 16:07:01 +00:00
|
|
|
"-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.targetPlatform}"
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/openfaas/faas-cli";
|
|
|
|
description = "Official CLI for OpenFaaS ";
|
|
|
|
license = licenses.mit;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ welteki techknowlogick ];
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
}
|