From ee5fa789d8b5f9c4812fbe73f9d296ca4995bff4 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Fri, 17 Jan 2025 18:01:19 +0800 Subject: [PATCH] fix helix donnot have fish completions --- pkgs/helix.nix | 79 +++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/pkgs/helix.nix b/pkgs/helix.nix index ce4e0cd..dc2be6a 100644 --- a/pkgs/helix.nix +++ b/pkgs/helix.nix @@ -4,40 +4,45 @@ inputs, ... }: -pkgs.runCommand "helix-wrapped" - { - buildInputs = [ pkgs.makeWrapper ]; - } - '' - mkdir -p $out/bin - makeWrapper "${lib.getExe inputs.helix.packages."${pkgs.system}".default}" $out/bin/hx \ - --suffix PATH : ${ - lib.makeBinPath ( - with pkgs; - [ - rustfmt - clang-tools - libxml2 - typstyle - pyright - ruff - gotools - yaml-language-server - taplo - markdown-oxide - nixd - deno - nixfmt-rfc-style - vscode-langservers-extracted - fish-lsp - gopls - golangci-lint-langserver - tinymist - delve - lldb - rust-analyzer - nil - ] - ) - } - '' +let + helix = inputs.helix.packages."${pkgs.system}".default; + runtimeInputs = ( + with pkgs; + [ + rustfmt + clang-tools + libxml2 + typstyle + pyright + ruff + gotools + yaml-language-server + taplo + markdown-oxide + nixd + deno + nixfmt-rfc-style + vscode-langservers-extracted + fish-lsp + gopls + golangci-lint-langserver + tinymist + delve + lldb + rust-analyzer + nil + ] + ); +in +pkgs.symlinkJoin { + name = "helix-wrapped"; + paths = [ helix ]; + inherit (helix) meta; + buildInputs = [ + pkgs.makeWrapper + ]; + postBuild = '' + wrapProgram $out/bin/hx \ + --suffix PATH : ${lib.makeBinPath runtimeInputs} + ''; +}