diff options
author | Han Verstraete <welteki@pm.me> | 2022-02-24 23:16:19 +0100 |
---|---|---|
committer | Han Verstraete <welteki@pm.me> | 2022-08-17 09:07:05 +0200 |
commit | c7af7831338f90966115b7931fbd47fbf7f73c62 (patch) | |
tree | b2730b5311499fe1f5025ddc15e2ee3566ca987e /pkgs/development/tools/faas-cli | |
parent | ace5332dcb78675cf21d7219b1d628614be21697 (diff) |
faas-cli: add git wrapper
Diffstat (limited to 'pkgs/development/tools/faas-cli')
-rw-r--r-- | pkgs/development/tools/faas-cli/default.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/tools/faas-cli/default.nix b/pkgs/development/tools/faas-cli/default.nix index f35f64b0bc8aa..07ea3a210e9a2 100644 --- a/pkgs/development/tools/faas-cli/default.nix +++ b/pkgs/development/tools/faas-cli/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub }: +{ lib +, stdenv +, buildGoModule +, fetchFromGitHub +, makeWrapper +, git +}: let faasPlatform = platform: let cpuName = platform.parsed.cpu.name; in { @@ -18,6 +24,8 @@ buildGoModule rec { sha256 = "sha256-nHpsScpVQhSoqvNZ+xTv2cA3lV1MyPZAgNLZRuyvksE="; }; + nativeBuildInputs = [ makeWrapper ]; + CGO_ENABLED = 0; vendorSha256 = null; @@ -31,6 +39,11 @@ buildGoModule rec { "-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; { homepage = "https://github.com/openfaas/faas-cli"; description = "Official CLI for OpenFaaS "; |