3
0
Fork 0
forked from mirrors/nixpkgs

helmfile: Stop prefixing PATH with kubernetes-helm

So helmfile will work with helm plugins wrapped by pkgs.wrapHelm:

```
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = nixpkgs.legacyPackages.${system};
      helm = pkgs.wrapHelm pkgs.kubernetes-helm {
        plugins = with pkgs.kubernetes-helmPlugins; [
          helm-diff helm-secrets
        ];
      };
    in {
      devShell = pkgs.mkShell {
        nativeBuildInputs = [
          helm
          pkgs.helmfile
        ];
      };
    });
}
```
This commit is contained in:
Zhong Jianxin 2021-11-06 11:35:28 +08:00
parent 4789953e5c
commit 056d880f90

View file

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm }:
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "helmfile";
@ -15,17 +15,10 @@ buildGoModule rec {
doCheck = false;
nativeBuildInputs = [ makeWrapper ];
subPackages = [ "." ];
ldflags = [ "-s" "-w" "-X github.com/roboll/helmfile/pkg/app/version.Version=${version}" ];
postInstall = ''
wrapProgram $out/bin/helmfile \
--prefix PATH : ${lib.makeBinPath [ kubernetes-helm ]}
'';
meta = {
description = "Deploy Kubernetes Helm charts";
homepage = "https://github.com/roboll/helmfile";