Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5, testers 6, helm-ls 7}: 8 9buildGoModule rec { 10 pname = "helm-ls"; 11 version = "0.0.3"; 12 13 src = fetchFromGitHub { 14 owner = "mrjosh"; 15 repo = "helm-ls"; 16 rev = "v${version}"; 17 hash = "sha256-MiDbV+mfr1wcc0e0iwFPL8WniWKbPnr4zb79qniT2Kc="; 18 }; 19 20 vendorHash = "sha256-EqZlmOoQtC3Iuf0LG2PL0K2pluGqbyA6132lzgF4+ic="; 21 22 nativeBuildInputs = [ installShellFiles ]; 23 24 ldflags = [ 25 "-s" 26 "-w" 27 "-X main.Version=${version}" 28 ]; 29 30 postInstall = '' 31 mv $out/bin/helm-ls $out/bin/helm_ls 32 installShellCompletion --cmd helm_ls \ 33 --bash <($out/bin/helm_ls completion bash) \ 34 --fish <($out/bin/helm_ls completion fish) \ 35 --zsh <($out/bin/helm_ls completion zsh) 36 ''; 37 38 passthru.tests.version = testers.testVersion { 39 package = helm-ls; 40 command = "helm_ls version"; 41 }; 42 43 meta = with lib; { 44 description = "Language server for Helm"; 45 changelog = "https://github.com/mrjosh/helm-ls/releases/tag/v${version}"; 46 homepage = "https://github.com/mrjosh/helm-ls"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ stehessel ]; 49 mainProgram = "helm_ls"; 50 }; 51}