From d2d3358f2a18ba150a1e62b47aaa17f8cb28b414 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 9 Aug 2023 02:10:16 +0200 Subject: [PATCH] lexical: fixup --- .lexical/lexical.log | 91 ++++++++++++++++++++++++ README.md | 2 +- flake.nix | 2 +- packages/{lexical-ls.nix => lexical.nix} | 27 +++---- 4 files changed, 102 insertions(+), 20 deletions(-) create mode 100644 .lexical/lexical.log rename packages/{lexical-ls.nix => lexical.nix} (74%) diff --git a/.lexical/lexical.log b/.lexical/lexical.log new file mode 100644 index 0000000..8079038 --- /dev/null +++ b/.lexical/lexical.log @@ -0,0 +1,91 @@ +02:09:44.703 [info] Child {LoggerFileBackend, :general_log} of Supervisor Logger.Backends.Supervisor started +Pid: #PID<0.1929.0> +Start Call: Logger.Backends.Watcher.start_link({{LoggerFileBackend, :general_log}, {LoggerFileBackend, :general_log}}) +Restart: :transient +Shutdown: 5000 +Type: :worker +02:09:44.703 [info] Child Logger.Backends.Supervisor of Supervisor Logger.Backends.Internal started +Pid: #PID<0.1928.0> +Start Call: Logger.Backends.Supervisor.start_link([{LoggerFileBackend, :general_log}]) +Restart: :permanent +Shutdown: :infinity +Type: :supervisor +02:09:44.703 [info] Child Logger.Backends.Internal of Supervisor Logger.Supervisor started +Pid: #PID<0.1924.0> +Start Call: Logger.Backends.Internal.start_link([]) +Restart: :permanent +Shutdown: :infinity +Type: :supervisor +02:09:44.703 [info] Application logger started at :nonode@nohost +02:09:44.703 [info] Application lx_lexical_shared started at :nonode@nohost +02:09:44.703 [info] Application lx_common started at :nonode@nohost +02:09:44.703 [info] Application lx_elixir_sense started at :nonode@nohost +02:09:44.703 [info] Application erts started at :nonode@nohost +02:09:44.703 [info] Application jason started at :nonode@nohost +02:09:44.703 [info] Application logger_file_backend started at :nonode@nohost +02:09:44.703 [info] Application lx_path_glob started at :nonode@nohost +02:09:44.703 [info] Application lx_proto started at :nonode@nohost +02:09:44.703 [info] Application lx_protocol started at :nonode@nohost +02:09:44.703 [info] Child :ttb_autostart of Supervisor :runtime_tools_sup started +Pid: #PID<0.1944.0> +Start Call: :ttb_autostart.start_link() +Restart: :temporary +Shutdown: 3000 +Type: :worker +02:09:44.703 [info] Application runtime_tools started at :nonode@nohost +02:09:44.704 [info] Child LXical.Document.Store of Supervisor LXical.Server.Supervisor started +Pid: #PID<0.1949.0> +Start Call: LXical.Document.Store.start_link([]) +Restart: :permanent +Shutdown: 5000 +Type: :worker +02:09:44.704 [info] Child LXical.Server of Supervisor LXical.Server.Supervisor started +Pid: #PID<0.1950.0> +Start Call: LXical.Server.start_link([]) +Restart: :permanent +Shutdown: 5000 +Type: :worker +02:09:44.704 [info] Child LXical.Server.ProjectSupervisor of Supervisor LXical.Server.Supervisor started +Pid: #PID<0.1951.0> +Start Call: DynamicSupervisor.start_link([name: LXical.Server.ProjectSupervisor, strategy: :one_for_one]) +Restart: :permanent +Shutdown: :infinity +Type: :supervisor +02:09:44.704 [info] Child LXical.Server.Provider.Queue.Supervisor of Supervisor LXical.Server.Supervisor started +Pid: #PID<0.1952.0> +Start Call: Task.Supervisor.start_link([name: LXical.Server.Provider.Queue.Supervisor]) +Restart: :permanent +Shutdown: :infinity +Type: :supervisor +02:09:44.704 [info] Child LXical.Server.Provider.Queue of Supervisor LXical.Server.Supervisor started +Pid: #PID<0.1953.0> +Start Call: LXical.Server.Provider.Queue.start_link([]) +Restart: :permanent +Shutdown: 5000 +Type: :worker +02:09:44.704 [info] Child LXical.Server.Transport.StdIO of Supervisor LXical.Server.Supervisor started +Pid: #PID<0.1954.0> +Start Call: LXical.Server.Transport.StdIO.start_link(:standard_io, &LXical.Server.protocol_message/1) +Restart: :permanent +Shutdown: 5000 +Type: :worker +02:09:44.704 [info] Application lx_server started at :nonode@nohost +02:09:44.710 [info] Child IEx.Config of Supervisor IEx.Supervisor started +Pid: #PID<0.1959.0> +Start Call: IEx.Config.start_link([]) +Restart: :permanent +Shutdown: 5000 +Type: :worker +02:09:44.710 [info] Child IEx.Broker of Supervisor IEx.Supervisor started +Pid: #PID<0.1960.0> +Start Call: IEx.Broker.start_link([]) +Restart: :permanent +Shutdown: 5000 +Type: :worker +02:09:44.710 [info] Child IEx.Pry of Supervisor IEx.Supervisor started +Pid: #PID<0.1961.0> +Start Call: IEx.Pry.start_link([]) +Restart: :permanent +Shutdown: 5000 +Type: :worker +02:09:44.710 [info] Application iex started at :nonode@nohost diff --git a/README.md b/README.md index 179a90c..cc29444 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ * [AnonymousOverflow](https://github.com/httpjamesm/AnonymousOverflow) * [cliclick](https://github.com/BlueM/cliclick) * [fennel-ls](https://git.sr.ht/~xerool/fennel-ls) -* [lexical-ls](https://github.com/lexical-lsp/lexical) +* [lexical](https://github.com/lexical-lsp/lexical) * [nitter](https://github.com/zedeus/nitter) * [phantomjs](https://github.com/ariya/phantomjs) * [q](https://github.com/natesales/q) diff --git a/flake.nix b/flake.nix index 8e67992..ac5d73b 100644 --- a/flake.nix +++ b/flake.nix @@ -53,7 +53,7 @@ { anonymous-overflow = import ./packages/anonymous-overflow.nix { inherit pkgs lib; }; fennel-ls = import ./packages/fennel-ls.nix { inherit pkgs lib; }; - lexical-ls = import ./packages/lexical-ls.nix { inherit pkgs lib; }; + lexical = import ./packages/lexical.nix { inherit pkgs lib; }; nitter-unstable = import ./packages/nitter-unstable.nix { inherit pkgs lib; }; q = import ./packages/q.nix { inherit pkgs lib; }; rimgo = import ./packages/rimgo.nix { inherit pkgs lib; }; diff --git a/packages/lexical-ls.nix b/packages/lexical.nix similarity index 74% rename from packages/lexical-ls.nix rename to packages/lexical.nix index 8365a84..7e1d455 100644 --- a/packages/lexical-ls.nix +++ b/packages/lexical.nix @@ -14,7 +14,7 @@ let }; in beamPackages.mixRelease rec { - pname = "lexical-ls"; + pname = "lexical"; version = "0.2.2"; src = pkgs.fetchFromGitHub { @@ -32,29 +32,20 @@ beamPackages.mixRelease rec { NAMESPACE = "1"; - configurePhase = '' - runHook preConfigure - mix deps.compile --no-deps-check - runHook postConfigure - ''; - installPhase = '' runHook preInstall mix release lexical --no-deps-check --path "$out" rm "$out/start_lexical.sh" - mv "$out/bin/lexical" "$out/bin/lexical-nocookie" - - cat > "$out/bin/lexical" << EOF - #!${pkgs.bash}/bin/bash - - RELEASE_COOKIE=${pname} - export RELEASE_COOKIE - - exec -a "$0" "$out/bin/lexical-nocookie" start "$@" - EOF - chmod +x "$out/bin/lexical" runHook postInstall ''; + + preFixup = '' + for script in $out/releases/*/elixir; do + substituteInPlace "$script" --replace 'ERL_EXEC="erl"' 'ERL_EXEC="${erlang}/bin/erl"' + done + + wrapProgram $out/bin/lexical --set RELEASE_COOKIE lexical + ''; }