mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, testers
|
|
, helm-ls
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "helm-ls";
|
|
version = "0.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mrjosh";
|
|
repo = "helm-ls";
|
|
rev = "v${version}";
|
|
hash = "sha256-EuZbbeRssacrctIbxBbd2GOh8zgFi2OBRregfC88se0=";
|
|
};
|
|
|
|
vendorHash = "sha256-AWKCE2BZGVYcr6Pe8URQo11Xnr3sfgWWkm9v7vvILOo=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.Version=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/helm-ls $out/bin/helm_ls
|
|
installShellCompletion --cmd helm_ls \
|
|
--bash <($out/bin/helm_ls completion bash) \
|
|
--fish <($out/bin/helm_ls completion fish) \
|
|
--zsh <($out/bin/helm_ls completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = helm-ls;
|
|
command = "helm_ls version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Language server for Helm";
|
|
changelog = "https://github.com/mrjosh/helm-ls/releases/tag/v${version}";
|
|
homepage = "https://github.com/mrjosh/helm-ls";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ stehessel ];
|
|
mainProgram = "helm_ls";
|
|
};
|
|
}
|