neovim: wrap in such a way as to avoid cross-compilation-specific patching
This commit is contained in:
parent
3d2babf2bb
commit
14202a5bcc
|
@ -103,8 +103,8 @@ in
|
|||
# "use"
|
||||
];
|
||||
|
||||
# packageUnwrapped = config.programs.neovim.finalPackage;
|
||||
packageUnwrapped = pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped (pkgs.neovimUtils.makeNeovimConfig {
|
||||
packageUnwrapped = let
|
||||
configArgs = {
|
||||
withRuby = false; #< doesn't cross-compile w/o binfmt
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
@ -150,7 +150,14 @@ in
|
|||
${plugin-config-lua}
|
||||
EOF
|
||||
'';
|
||||
});
|
||||
};
|
||||
in pkgs.wrapNeovimUnstable
|
||||
pkgs.neovim-unwrapped
|
||||
# XXX(2024/05/13): manifestRc must be null for cross-compilation to work.
|
||||
# wrapper invokes `neovim` with all plugins enabled at build time i guess to generate caches and stuff?
|
||||
# alternative is to emulate `nvim-wrapper` during build.
|
||||
((pkgs.neovimUtils.makeNeovimConfig configArgs) // { manifestRc = null; })
|
||||
;
|
||||
|
||||
# private because there could be sensitive things in the swap
|
||||
persist.byStore.private = [ ".cache/vim-swap" ];
|
||||
|
|
|
@ -2094,15 +2094,15 @@ in with final; {
|
|||
# };
|
||||
|
||||
# fixes `hostPrograms.moby.neovim` (but breaks eval of `hostPkgs.moby.neovim` :o)
|
||||
wrapNeovimUnstable = neovim: config: (prev.wrapNeovimUnstable neovim config).overrideAttrs (upstream: {
|
||||
# nvim wrapper has a sanity check that the plugins will load correctly.
|
||||
# this is effectively a check phase and should be rewritten as such
|
||||
postBuild = lib.replaceStrings
|
||||
[ "! $out/bin/nvim-wrapper" ]
|
||||
# [ "${stdenv.hostPlatform.emulator buildPackages} $out/bin/nvim-wrapper" ]
|
||||
[ "false && $out/bin/nvim-wrapper" ]
|
||||
upstream.postBuild;
|
||||
});
|
||||
# wrapNeovimUnstable = neovim: config: (prev.wrapNeovimUnstable neovim config).overrideAttrs (upstream: {
|
||||
# # nvim wrapper has a sanity check that the plugins will load correctly.
|
||||
# # this is effectively a check phase and should be rewritten as such
|
||||
# postBuild = lib.replaceStrings
|
||||
# [ "! $out/bin/nvim-wrapper" ]
|
||||
# # [ "${stdenv.hostPlatform.emulator buildPackages} $out/bin/nvim-wrapper" ]
|
||||
# [ "false && $out/bin/nvim-wrapper" ]
|
||||
# upstream.postBuild;
|
||||
# });
|
||||
|
||||
# 2023/07/30: upstreaming is blocked on unar (gnustep), unless i also make that optional
|
||||
xarchiver = mvToNativeInputs [ libxslt ] prev.xarchiver;
|
||||
|
|
Loading…
Reference in New Issue
Block a user