1
0
Fork 0

lexical: init

This commit is contained in:
Daniel Kempkens 2023-08-09 01:25:34 +02:00
parent b18065efcd
commit f7bbdda504
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
4 changed files with 64 additions and 0 deletions

View file

@ -26,6 +26,7 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build '.#anonymous-overflow'
- run: nix build '.#fennel-ls'
- run: nix build '.#lexical-ls'
- run: nix build '.#nitter-unstable'
- run: nix build '.#neovim-nightly'
- run: nix build '.#q'
@ -45,6 +46,7 @@ jobs:
name: nifoc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build '.#fennel-ls'
- run: nix build '.#lexical-ls'
- run: nix build '.#neovim-nightly'
- run: nix build '.#q'
- run: nix build '.#weewx-proxy'

View file

@ -6,6 +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)
* [nitter](https://github.com/zedeus/nitter)
* [phantomjs](https://github.com/ariya/phantomjs)
* [q](https://github.com/natesales/q)

View file

@ -53,6 +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; };
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; };

60
packages/lexical-ls.nix Normal file
View file

@ -0,0 +1,60 @@
{ pkgs, lib }:
let
erlang = pkgs.beam.interpreters.erlangR25;
beamPackagesPrev = pkgs.beam.packagesWith erlang;
elixir = beamPackagesPrev.elixir_1_15;
beamPackages = beamPackagesPrev // rec {
inherit erlang elixir;
hex = beamPackagesPrev.hex.override { inherit elixir; };
buildMix = beamPackagesPrev.buildMix.override { inherit elixir erlang hex; };
mixRelease = beamPackagesPrev.mixRelease.override { inherit erlang elixir; };
fetchMixDeps = beamPackagesPrev.fetchMixDeps.override { inherit elixir; };
};
in
beamPackages.mixRelease rec {
pname = "lexical-ls";
version = "0.2.2";
src = pkgs.fetchFromGitHub {
owner = "lexical-lsp";
repo = "lexical";
rev = "9f89426a38de8e90cbf352396641226f3a7a6c17";
sha256 = "sha256-t4a5mq5lUCU6uWgN0/hCCuPvyqVksUTjSu8Ajw+9tHA=";
};
mixFodDeps = beamPackages.fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version;
sha256 = "sha256-a715z1ti1J0kKzLcIS1UuFpPAMEx2VlFpkmZrRTSWh4=";
};
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" "$@"
EOF
chmod +x "$out/bin/lexical"
runHook postInstall
'';
}