12 faasPlatform = platform:
13 let cpuName = platform.parsed.cpu.name; in {
17 }.${cpuName} or cpuName;
23 src = fetchFromGitHub {
27 sha256 = "sha256-eyQpeud0rW07eb6wtcTYem10LWf/g2dxRwQEMH29wL8=";
34 subPackages = [ "." ];
38 "-X github.com/openfaas/faas-cli/version.GitCommit=ref/tags/${version}"
39 "-X github.com/openfaas/faas-cli/version.Version=${version}"
40 "-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.hostPlatform}"
43 nativeBuildInputs = [ makeWrapper installShellFiles ];
46 wrapProgram "$out/bin/faas-cli" \
47 --prefix PATH : ${lib.makeBinPath [ git ]}
49 installShellCompletion --cmd metal \
50 --bash <($out/bin/faas-cli completion --shell bash) \
51 --zsh <($out/bin/faas-cli completion --shell zsh)
54 passthru.tests.version = testers.testVersion {
55 command = "${faas-cli}/bin/faas-cli version --short-version --warn-update=false";
60 description = "Official CLI for OpenFaaS ";
61 mainProgram = "faas-cli";
62 homepage = "https://github.com/openfaas/faas-cli";
63 license = licenses.mit;
64 maintainers = with maintainers; [ welteki techknowlogick ];