Files
nixpkgs/pkgs/by-name/sp/spacevim/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

83 lines
2.1 KiB
Nix

{
fetchFromGitHub,
formats,
fzf,
git,
lib,
makeWrapper,
neovim,
nix-update-script,
ripgrep,
runCommand,
stdenv,
vim-full,
spacevim_config ? import ./init.nix,
}:
let
format = formats.toml { };
spacevimdir = runCommand "SpaceVim.d" { } ''
mkdir -p $out
cp ${format.generate "init.toml" spacevim_config} $out/init.toml
'';
in
stdenv.mkDerivation rec {
pname = "spacevim";
version = "2.4.0";
src = fetchFromGitHub {
owner = "SpaceVim";
repo = "SpaceVim";
rev = "v${version}";
hash = "sha256-qiNadhQJjU9RY14X8+pd4Ul+NLoNqbxuh3Kenw1dHDc=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r $(pwd) $out/SpaceVim
# trailing slash very important for SPACEVIMDIR
makeWrapper "${vim-full}/bin/vim" "$out/bin/spacevim" \
--add-flags "-u $out/SpaceVim/vimrc" --set SPACEVIMDIR "${spacevimdir}/" \
--prefix PATH : ${
lib.makeBinPath [
fzf
git
ripgrep
]
}
makeWrapper "${neovim}/bin/nvim" "$out/bin/spacenvim" \
--add-flags "-u $out/SpaceVim/init.vim" --set SPACEVIMDIR "${spacevimdir}/" \
--prefix PATH : ${
lib.makeBinPath [
fzf
git
ripgrep
]
}
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Modular Vim/Neovim configuration";
longDescription = ''
SpaceVim is a modular configuration of Vim and Neovim. It's inspired by
spacemacs. It manages collections of plugins in layers, which help to
collect related packages together to provide features. This approach
helps keep the configuration organized and reduces overhead for the user
by keeping them from having to think about what packages to install.
'';
homepage = "https://spacevim.org/";
license = lib.licenses.gpl3Plus;
maintainers = [ lib.maintainers.perchun ];
platforms = lib.platforms.all;
mainProgram = "spacevim";
};
}