mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
vimUtils: don't copy the build directory with dontUnpack (#568289)
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
target=$out/${rtpPath}/${path}
|
||||
mkdir -p $out/${rtpPath}
|
||||
cp -r . $target
|
||||
${lib.optionalString (!(attrs.dontUnpack or false)) "cp -r . $target"}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -25,6 +25,26 @@ lib.recurseIntoAttrs {
|
||||
vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ];
|
||||
};
|
||||
|
||||
test_vim_plugin_dont_unpack =
|
||||
let
|
||||
plugin = vimUtils.buildVimPlugin {
|
||||
pname = "vim-plugin-dont-unpack-test";
|
||||
version = "0";
|
||||
src = pkgs.writeText "probe.vim" "";
|
||||
dontUnpack = true;
|
||||
buildPhase = ''
|
||||
install -D "$src" "$out/colors/probe.vim"
|
||||
'';
|
||||
};
|
||||
in
|
||||
pkgs.runCommand "vim-plugin-dont-unpack-test" { } ''
|
||||
test -f ${plugin}/colors/probe.vim
|
||||
for file in env-vars .attrs.json .attrs.sh; do
|
||||
test ! -e ${plugin}/"$file"
|
||||
done
|
||||
mkdir -p "$out"
|
||||
'';
|
||||
|
||||
# test that all vimPlugins have `passthru.vimPlugin = true`
|
||||
test-all-plugins-have-vimPlugin-true =
|
||||
let
|
||||
|
||||
Reference in New Issue
Block a user