Unverified Commit be4544b1 authored by Jared Baur's avatar Jared Baur
Browse files

zls_0_14: init at 0.14.0

This moves zls out of by-name in preparation for adding more zls
versions with shared nix expressions.
parent 38c4f0e4
Loading
Loading
Loading
Loading

pkgs/by-name/zl/zls/package.nix

deleted100644 → 0
+0 −40
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  zig_0_14,
  fetchFromGitHub,
  callPackage,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "zls";
  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.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
  '';

  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
    ];
    platforms = lib.platforms.unix;
  };
})
+47 −0
Original line number Diff line number Diff line
{
  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
      ];
      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
    '';
  };
}
+7 −0
Original line number Diff line number Diff line
@@ -9237,6 +9237,13 @@ with pkgs;

  zigStdenv = if stdenv.cc.isZig then stdenv else lowPrio zig.passthru.stdenv;

  inherit (callPackages ../development/tools/zls { })
    zls_0_14
    ;

  # This should be kept updated to ensure the default zls version matches the default zig version.
  zls = zls_0_14;

  libzint = zint-qt.override { withGUI = false; };

  aroccPackages = recurseIntoAttrs (callPackage ../development/compilers/arocc { });