From 79ae7a5dc40b7ceeeb656f0c7e65d9e5ee171f4c Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Mon, 6 May 2024 09:50:16 +0200 Subject: [PATCH] zls 0.12 is merged now --- flake.nix | 5 +---- nix/zls/default.nix | 51 --------------------------------------------- nix/zls/deps.nix | 20 ------------------ 3 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 nix/zls/default.nix delete mode 100644 nix/zls/deps.nix diff --git a/flake.nix b/flake.nix index ea6420d..d9f22e1 100644 --- a/flake.nix +++ b/flake.nix @@ -24,9 +24,6 @@ inputs.git-hooks.flakeModule inputs.treefmt-nix.flakeModule - # This is until zls 0.12 is merged - ./nix/zls - ./nix/vegetable-hamper ]; @@ -59,7 +56,7 @@ packages = [ zig_0_12 - config.packages.zls + zls wayland wayland-protocols diff --git a/nix/zls/default.nix b/nix/zls/default.nix deleted file mode 100644 index d0e12f8..0000000 --- a/nix/zls/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - # { lib - # , stdenv - # , fetchFromGitHub - # , zig_0_11 - # , callPackage - # }: - - perSystem = - { pkgs, lib, ... }: - { - packages.zls = pkgs.stdenv.mkDerivation (finalAttrs: { - pname = "zls"; - version = "0.12.0"; - - src = pkgs.fetchFromGitHub { - owner = "zigtools"; - repo = "zls"; - rev = finalAttrs.version; - fetchSubmodules = true; - hash = "sha256-2iVDPUj9ExgTooDQmCCtZs3wxBe2be9xjzAk9HedPNY="; - }; - - langref = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/ziglang/zig/a685ab1499d6560c523f0dbce2890dc140671e43/doc/langref.html.in"; - hash = "sha256-7lFSfkVLOrn42nYnYyDmBkkRfM903lUUJZ5Sg+eBUpE="; - }; - - zigBuildFlags = [ "-Dversion_data_path=${finalAttrs.langref}" ]; - - nativeBuildInputs = [ pkgs.zig_0_12.hook ]; - - postPatch = '' - ln -s ${pkgs.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 - ]; - platforms = lib.platforms.unix; - }; - }); - }; -} diff --git a/nix/zls/deps.nix b/nix/zls/deps.nix deleted file mode 100644 index 4de5062..0000000 --- a/nix/zls/deps.nix +++ /dev/null @@ -1,20 +0,0 @@ -# generated by zon2nix (https://github.com/figsoda/zon2nix) - -{ linkFarm, fetchzip }: - -linkFarm "zig-packages" [ - { - name = "12201314cffeb40c5e4e3da166217d2c74628c74486414aaf97422bcd2279915b9fd"; - path = fetchzip { - url = "https://github.com/ziglibs/known-folders/archive/bf79988adcfce166f848e4b11e718c1966365329.tar.gz"; - hash = "sha256-Q7eMdyScqj8qEiAHg1BnGRTsWSQOKWWTc6hUYHNlgGg="; - }; - } - { - name = "12200d71e4b7029ea56a429e24260c6c0e85a3069b0d4ba85eace21a0fd75910aa64"; - path = fetchzip { - url = "https://github.com/ziglibs/diffz/archive/e10bf15962e45affb3fcd7d9a950977a69c901b3.tar.gz"; - hash = "sha256-yVFPVn4jGfcoE2V4xdTqdThYPutshL6U4feDzetWgFw="; - }; - } -]