nixos-config/pkgs/lunarvim/default.nix

47 lines
985 B
Nix
Raw Normal View History

{ pkgs, ... }:
2024-02-05 11:46:52 +01:00
with pkgs;
let
nvim-customized = wrapNeovim neovim-unwrapped { };
2021-11-25 17:18:13 +01:00
in
stdenv.mkDerivation rec {
pname = "lunarvim";
version = "0.0.1";
2021-11-25 17:18:13 +01:00
src = fetchFromGitHub {
owner = "LunarVim";
repo = "LunarVim";
rev = "0e531891b1dfd04fa02a22b48ce075120b512277";
sha256 = "0yfr3vh8p1s9wy21s6bgpp6kp6s9pqlb6k66s76sa22vz4sjiyxb";
};
2021-11-25 17:18:13 +01:00
2024-02-05 11:46:52 +01:00
nativeBuildInputs = [
makeWrapper
nvim-customized
];
buildInputs = [ nvim-customized ];
2021-11-25 17:18:13 +01:00
buildPhase = ''
echo "hello"
'';
2021-11-25 17:18:13 +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" \
2024-02-05 11:46:52 +01:00
--prefix PATH : ${
lib.makeBinPath [
fzf
git
ripgrep
]
}
runHook postInstall
'';
}