File tree Expand file tree Collapse file tree 1 file changed +68
-0
lines changed Expand file tree Collapse file tree 1 file changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ buildGoModule ,
3+ buildPackages ,
4+ fetchFromGitHub ,
5+ installShellFiles ,
6+ lib ,
7+ stdenv ,
8+ versionCheckHook ,
9+ } :
10+ buildGoModule ( finalAttrs : {
11+ pname = "nelm" ;
12+ version = "1.3.0" ;
13+
14+ src = fetchFromGitHub {
15+ owner = "werf" ;
16+ repo = "nelm" ;
17+ tag = "v${ finalAttrs . version } " ;
18+ hash = "sha256-voSGwr4wpei9U5L/6uAcapjNZ5CVn49mwngfsXMcxB0=" ;
19+ } ;
20+
21+ vendorHash = "sha256-kLFQtRAsxA7fdQIgpa0eV3hSpX5pAGT1DTGeGkawvVk=" ;
22+
23+ subPackages = [ "cmd/nelm" ] ;
24+
25+ ldflags = [
26+ "-s"
27+ "-w"
28+ "-X github.com/werf/nelm/internal/common.Brand=Nelm"
29+ "-X github.com/werf/nelm/internal/common.Version=${ finalAttrs . version } "
30+ ] ;
31+
32+ nativeBuildInputs = [ installShellFiles ] ;
33+
34+ preCheck = ''
35+ # Test all packages.
36+ unset subPackages
37+ '' ;
38+
39+ postInstall = lib . optionalString ( stdenv . hostPlatform . emulatorAvailable buildPackages ) (
40+ let
41+ emulator = stdenv . hostPlatform . emulator buildPackages ;
42+ in
43+ ''
44+ for shell in bash fish zsh; do
45+ installShellCompletion \
46+ --cmd nelm \
47+ --$shell <(${ emulator } $out/bin/nelm completion $shell)
48+ done
49+ ''
50+ ) ;
51+
52+ nativeInstallCheckInputs = [ versionCheckHook ] ;
53+ doInstallCheck = true ;
54+ versionCheckProgramArg = "version" ;
55+
56+ meta = {
57+ description = "Kubernetes deployment tool, alternative to Helm 3" ;
58+ longDescription = ''
59+ Nelm is a Helm 3 alternative. It is a Kubernetes deployment tool that
60+ manages Helm Charts and deploys them to Kubernetes.
61+ '' ;
62+ homepage = "https://github.com/werf/nelm" ;
63+ changelog = "https://github.com/werf/nelm/releases/tag/v${ finalAttrs . version } " ;
64+ license = lib . licenses . asl20 ;
65+ maintainers = [ lib . maintainers . azahi ] ;
66+ mainProgram = "nelm" ;
67+ } ;
68+ } )
You can’t perform that action at this time.
0 commit comments