lunarvim: set CC rather than prefixing CC

This commit is contained in:
asonix 2024-05-24 14:00:40 -05:00
parent c5dfe23286
commit a8114ee23f

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [
@ -6,7 +6,32 @@
fd
gcc
gnumake
lunarvim
(lunarvim.overrideAttrs (finalAttrs: {
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r bin share $out
for iconDir in utils/desktop/*/; do
install -Dm444 $iconDir/lvim.svg -t $out/share/icons/hicolor/$(basename $iconDir)/apps
done
install -Dm444 utils/desktop/lvim.desktop -t $out/share/applications
wrapProgram $out/bin/lvim --prefix PATH : ${ lib.makeBinPath finalAttrs.runtimeDeps } \
--prefix LD_LIBRARY_PATH : ${stdenv.cc.cc.lib} \
--set CC ${stdenv.cc.targetPrefix}cc
'' + lib.optionalString finalAttrs.nvimAlias ''
ln -s $out/bin/lvim $out/bin/nvim
'' + lib.optionalString finalAttrs.viAlias ''
ln -s $out/bin/lvim $out/bin/vi
'' + lib.optionalString finalAttrs.vimAlias ''
ln -s $out/bin/lvim $out/bin/vim
'' + ''
runHook postInstall
'';
}))
nodejs
python310Full
python310Packages.pynvim