depot/third_party/nixpkgs/pkgs/development/tools/zls/default.nix
Default email ca5ab3a501 Project import generated by Copybara.
GitOrigin-RevId: 4a01ca36d6bfc133bc617e661916a81327c9bbc8
2022-07-14 08:49:19 -04:00

32 lines
770 B
Nix

{ stdenv, lib, fetchFromGitHub, zig }:
stdenv.mkDerivation rec {
pname = "zls";
version = "0.9.0";
src = fetchFromGitHub {
owner = "zigtools";
repo = pname;
rev = version;
sha256 = "sha256-MVo21qNCZop/HXBqrPcosGbRY+W69KNCc1DfnH47GsI=";
fetchSubmodules = true;
};
nativeBuildInputs = [ zig ];
preBuild = ''
export HOME=$TMPDIR
'';
installPhase = ''
zig build -Drelease-safe -Dcpu=baseline --prefix $out install
'';
meta = with lib; {
description = "Zig LSP implementation + Zig Language Server";
changelog = "https://github.com/zigtools/zls/releases/tag/${version}";
homepage = "https://github.com/zigtools/zls";
license = licenses.mit;
maintainers = with maintainers; [ fortuneteller2k ];
};
}