lexical: update build
This commit is contained in:
parent
6f066503cc
commit
4468f35910
2 changed files with 49 additions and 3 deletions
|
@ -40,7 +40,7 @@
|
|||
discord-downloader-go = import ./packages/discord-downloader-go.nix { inherit pkgs lib; };
|
||||
fennel-ls = import ./packages/fennel-ls.nix { inherit pkgs lib; };
|
||||
headscale-ui = import ./packages/headscale-ui.nix { inherit pkgs lib; };
|
||||
lexical = import ./packages/lexical.nix { inherit system; };
|
||||
lexical = import ./packages/lexical.nix { inherit pkgs lib; };
|
||||
neovim-nightly = import ./packages/neovim-nightly.nix { inherit (inputs'.neovim-flake.packages) neovim; inherit pkgs lib; };
|
||||
q = import ./packages/q.nix { inherit pkgs lib; };
|
||||
redlib = import ./packages/redlib.nix { inherit pkgs lib; };
|
||||
|
|
|
@ -1,3 +1,49 @@
|
|||
{ system, ... }:
|
||||
{ pkgs, lib }:
|
||||
|
||||
(builtins.getFlake "github:lexical-lsp/lexical/aba16bb757822535357a2100db7045b0cae0528a").packages.${system}.default
|
||||
let
|
||||
erlang = pkgs.beam.interpreters.erlangR26;
|
||||
beamPackages = pkgs.beam.packagesWith erlang;
|
||||
in
|
||||
beamPackages.mixRelease rec {
|
||||
pname = "lexical";
|
||||
version = "0.5.2";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lexical-lsp";
|
||||
repo = "lexical";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-HWqwJ7PAz80bm6YeDG84hLWPE11n06K98GOyeDQWZWU=";
|
||||
};
|
||||
|
||||
mixFodDeps = beamPackages.fetchMixDeps {
|
||||
pname = "mix-deps-${pname}";
|
||||
inherit src version;
|
||||
sha256 = "sha256-oxR56mzV0uRs40j5N+bU1QDMXTYnJ789cUoOG462KtI=";
|
||||
};
|
||||
|
||||
NAMESPACE = "1";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mix do compile --no-deps-check, package --path "$out"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup =
|
||||
let
|
||||
activate_version_manager = pkgs.writeScript "activate_version_manager.sh" ''
|
||||
true
|
||||
'';
|
||||
in
|
||||
''
|
||||
substituteInPlace "$out/bin/start_lexical.sh" --replace 'elixir_command=' 'elixir_command="${beamPackages.elixir}/bin/"'
|
||||
rm "$out/bin/activate_version_manager.sh"
|
||||
ln -s ${activate_version_manager} "$out/bin/activate_version_manager.sh"
|
||||
|
||||
mv "$out/bin" "$out/binsh"
|
||||
|
||||
makeWrapper "$out/binsh/start_lexical.sh" "$out/bin/lexical" --set RELEASE_COOKIE lexical
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue