59eb02116f
Zig is still under active development, and new releases often introduce breaking changes. This makes updating the default version of zig easier. Some packages did not receive this change because they could be using the c compiler or linker of zig, which doesn't receive as much breaking changes compared to e.g. the zig std library. https://github.com/NixOS/nixpkgs/pull/248243#discussion_r1289401340
37 lines
829 B
Nix
37 lines
829 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, zig_0_11
|
|
, callPackage
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "zls";
|
|
version = "0.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zigtools";
|
|
repo = "zls";
|
|
rev = finalAttrs.version;
|
|
fetchSubmodules = true;
|
|
hash = "sha256-WrbjJyc4pj7R4qExdzd0DOQ9Tz3TFensAfHdecBA8UI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
zig_0_11.hook
|
|
];
|
|
|
|
postPatch = ''
|
|
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
|
|
'';
|
|
|
|
meta = {
|
|
description = "Zig LSP implementation + Zig Language Server";
|
|
changelog = "https://github.com/zigtools/zls/releases/tag/${finalAttrs.version}";
|
|
homepage = "https://github.com/zigtools/zls";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ figsoda fortuneteller2k ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|