lexical: use flake
This commit is contained in:
parent
ba532ee7e3
commit
a3e4fc16ca
2 changed files with 3 additions and 53 deletions
|
@ -41,7 +41,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 pkgs lib; };
|
||||
lexical = import ./packages/lexical.nix { inherit system; };
|
||||
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,53 +1,3 @@
|
|||
{ pkgs, lib }:
|
||||
{ system, ... }:
|
||||
|
||||
let
|
||||
erlang = pkgs.beam.interpreters.erlangR26;
|
||||
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";
|
||||
version = "0.4.1";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lexical-lsp";
|
||||
repo = "lexical";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-X9oXx7+BjsfzVpPwZeI9ezuwHGDyvrSx940LsR6Mw8A=";
|
||||
};
|
||||
|
||||
mixFodDeps = beamPackages.fetchMixDeps {
|
||||
pname = "mix-deps-${pname}";
|
||||
inherit src version;
|
||||
sha256 = "sha256-SQiXUjHmvtXUbHpPI1WSqsvPCauw+wiQmuwqUXOOscM=";
|
||||
};
|
||||
|
||||
NAMESPACE = "1";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mix do compile --no-deps-check, package --path "$out"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
for script in $out/releases/*/elixir; do
|
||||
substituteInPlace "$script" --replace 'ERL_EXEC="erl"' 'ERL_EXEC="${erlang}/bin/erl"'
|
||||
done
|
||||
|
||||
chmod -x $out/bin/boot.exs
|
||||
substituteInPlace $out/bin/start_lexical.sh --replace '! . "$script_dir"/activate_version_manager.sh' 'false'
|
||||
|
||||
makeWrapper $out/bin/start_lexical.sh $out/bin/lexical --set RELEASE_COOKIE lexical
|
||||
'';
|
||||
}
|
||||
(builtins.getFlake "github:lexical-lsp/lexical/a028a549e22f036d413334a42b67c9bb3cbdd13c").packages.${system}.default
|
||||
|
|
Loading…
Reference in a new issue