2022-03-01 22:19:03 +01:00
|
|
|
{pkgs, ...}:
|
|
|
|
with pkgs; let
|
|
|
|
nvim-customized = wrapNeovim neovim-unwrapped {};
|
2021-11-25 17:18:13 +01:00
|
|
|
in
|
2022-03-01 22:19:03 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lunarvim";
|
|
|
|
version = "0.0.1";
|
2021-11-25 17:18:13 +01:00
|
|
|
|
2022-03-01 22:19:03 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LunarVim";
|
|
|
|
repo = "LunarVim";
|
|
|
|
rev = "0e531891b1dfd04fa02a22b48ce075120b512277";
|
|
|
|
sha256 = "0yfr3vh8p1s9wy21s6bgpp6kp6s9pqlb6k66s76sa22vz4sjiyxb";
|
|
|
|
};
|
2021-11-25 17:18:13 +01:00
|
|
|
|
2022-03-01 22:19:03 +01:00
|
|
|
nativeBuildInputs = [makeWrapper nvim-customized];
|
|
|
|
buildInputs = [nvim-customized];
|
2021-11-25 17:18:13 +01:00
|
|
|
|
2022-03-01 22:19:03 +01:00
|
|
|
buildPhase = ''
|
|
|
|
echo "hello"
|
|
|
|
'';
|
2021-11-25 17:18:13 +01:00
|
|
|
|
2022-03-01 22:19:03 +01:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r $(pwd) $out/lvim
|
|
|
|
export shim="$out/lvim/utils/bin/lvim"
|
|
|
|
substituteInPlace "$shim" \
|
|
|
|
--replace "exec nvim" "exec ${nvim-customized}/bin/nvim"
|
|
|
|
chmod +x "$shim"
|
|
|
|
makeWrapper "$shim" "$out/bin/lvim" \
|
|
|
|
--set LUNARVIM_RUNTIME_DIR "$out" \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [fzf git ripgrep]}
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|