Files
nixpkgs/pkgs/development/tools/zls/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

67 lines
1.5 KiB
Nix

{
lib,
stdenv,
zig_0_14,
zig_0_15,
fetchFromGitHub,
callPackage,
}:
let
common = finalAttrs: _: {
pname = "zls";
meta = {
description = "Zig LSP implementation + Zig Language Server";
mainProgram = "zls";
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
moni
_0x5a4
jmbaur
];
platforms = lib.platforms.unix;
};
};
in
lib.mapAttrs (_: extension: stdenv.mkDerivation (lib.extends common extension)) {
zls_0_14 = finalAttrs: {
version = "0.14.0";
src = fetchFromGitHub {
owner = "zigtools";
repo = "zls";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-A5Mn+mfIefOsX+eNBRHrDVkqFDVrD3iXDNsUL4TPhKo=";
};
nativeBuildInputs = [ zig_0_14.hook ];
postPatch = ''
ln -s ${callPackage ./deps_0_14.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
};
zls_0_15 = finalAttrs: {
version = "0.15.0";
src = fetchFromGitHub {
owner = "zigtools";
repo = "zls";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-GFzSHUljcxy7sM1PaabbkQUdUnLwpherekPWJFxXtnk=";
};
nativeBuildInputs = [ zig_0_15.hook ];
postPatch = ''
ln -s ${callPackage ./deps_0_15.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
};
}