blob: 7729ca16881e33bf18be13671e9a3cc83391f25b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, coreutils, findutils, getopt, gnugrep, gnused, sops, vault }:
stdenv.mkDerivation rec {
pname = "helm-secrets";
version = "4.6.0";
src = fetchFromGitHub {
owner = "jkroepke";
repo = pname;
rev = "v${version}";
hash = "sha256-j4mOkPHJKiRWGTZloPBXwbHKOj2Hg44dspySa/KxPT4=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ getopt sops ];
# NOTE: helm-secrets is comprised of shell scripts.
dontBuild = true;
# NOTE: Fix version string
postPatch = ''
sed -i 's/^version:.*/version: "${version}"/' plugin.yaml
'';
installPhase = ''
runHook preInstall
install -dm755 $out/${pname} $out/${pname}/scripts
install -m644 -Dt $out/${pname} plugin.yaml
cp -r scripts/* $out/${pname}/scripts
wrapProgram $out/${pname}/scripts/run.sh \
--prefix PATH : ${lib.makeBinPath [ coreutils findutils getopt gnugrep gnused sops vault ]}
runHook postInstall
'';
meta = with lib; {
description = "A Helm plugin that helps manage secrets";
homepage = "https://github.com/jkroepke/helm-secrets";
license = licenses.asl20;
maintainers = with maintainers; [ yurrriq ];
platforms = platforms.unix;
};
}
|