nixos-config/pkgs/lunarvim/default.nix
Erwin Boskma 4cd0f83ce8
Some checks failed
/ check (push) Failing after 2m46s
Run nixfmt
2024-02-05 11:46:52 +01:00

46 lines
985 B
Nix

{ pkgs, ... }:
with pkgs;
let
nvim-customized = wrapNeovim neovim-unwrapped { };
in
stdenv.mkDerivation rec {
pname = "lunarvim";
version = "0.0.1";
src = fetchFromGitHub {
owner = "LunarVim";
repo = "LunarVim";
rev = "0e531891b1dfd04fa02a22b48ce075120b512277";
sha256 = "0yfr3vh8p1s9wy21s6bgpp6kp6s9pqlb6k66s76sa22vz4sjiyxb";
};
nativeBuildInputs = [
makeWrapper
nvim-customized
];
buildInputs = [ nvim-customized ];
buildPhase = ''
echo "hello"
'';
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
'';
}