faas-cli: add git wrapper
This commit is contained in:
parent
ace5332dcb
commit
c7af783133
1 changed files with 14 additions and 1 deletions
|
@ -1,4 +1,10 @@
|
||||||
{ lib, stdenv, buildGoModule, fetchFromGitHub }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
, makeWrapper
|
||||||
|
, git
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
faasPlatform = platform:
|
faasPlatform = platform:
|
||||||
let cpuName = platform.parsed.cpu.name; in {
|
let cpuName = platform.parsed.cpu.name; in {
|
||||||
|
@ -18,6 +24,8 @@ buildGoModule rec {
|
||||||
sha256 = "sha256-nHpsScpVQhSoqvNZ+xTv2cA3lV1MyPZAgNLZRuyvksE=";
|
sha256 = "sha256-nHpsScpVQhSoqvNZ+xTv2cA3lV1MyPZAgNLZRuyvksE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
CGO_ENABLED = 0;
|
CGO_ENABLED = 0;
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
@ -31,6 +39,11 @@ buildGoModule rec {
|
||||||
"-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.targetPlatform}"
|
"-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.targetPlatform}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram "$out/bin/faas-cli" \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ git ]}
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/openfaas/faas-cli";
|
homepage = "https://github.com/openfaas/faas-cli";
|
||||||
description = "Official CLI for OpenFaaS ";
|
description = "Official CLI for OpenFaaS ";
|
||||||
|
|
Loading…
Reference in a new issue