2021-04-23 20:38:02 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, zig }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zls";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zigtools";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-A4aOdmlIxBUeKyczzLxH4y1Rl9TgE1EeiKGbWY4p/00=";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ zig ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-20 03:25:16 +01:00
|
|
|
zig build -Drelease-safe -Dtarget=${stdenv.hostPlatform.parsed.cpu.name}-native --prefix $out install
|
2021-04-23 20:38:02 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
2021-05-20 03:25:16 +01:00
|
|
|
license = licenses.mit;
|
2021-04-23 20:38:02 +01:00
|
|
|
maintainers = with maintainers; [ fortuneteller2k ];
|
|
|
|
};
|
|
|
|
}
|