wrapper: Use symlink join to install man pages for standalone (#736)

Patching the derivation forces a rebuild of neovim, which is
undesirable
This commit is contained in:
traxys 2023-11-23 22:11:29 +01:00 committed by GitHub
parent a108c2e676
commit b58b23c799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,13 +30,10 @@ default_pkgs: {
config = handleAssertions eval.config;
in
config.finalPackage.overrideAttrs (oa: {
preInstall =
if config.enableMan
then ''
mkdir -p $out/share/man/man5
cp ${self.packages.${pkgs.system}.man-docs}/share/man/man5/nixvim.5 $out/share/man/man5
''
else ''
'';
})
pkgs.symlinkJoin {
name = "nixvim";
paths =
[config.finalPackage]
++ pkgs.lib.optional config.enableMan self.packages.${pkgs.system}.man-docs;
meta.mainProgram = "nvim";
}