Matthieu Coudron 57bbd52af5
packages luarocks updater as pyproject package (#343584)
* luarocks-packages-updater: convert into pyproject package

* pluginupdate: move to its own folder

so we can copy just the folder when using this as a module

* luarocks-packages-updater: adress review
2024-09-22 21:15:41 +02:00

47 lines
973 B
Nix

{ buildPythonApplication
, nix
, makeWrapper
, python3Packages
, lib
, nix-prefetch-git
, nurl
# optional
, neovim-unwrapped
}:
buildPythonApplication {
pname = "vim-plugins-updater";
version = "0.1";
format = "other";
nativeBuildInputs = [
makeWrapper
python3Packages.wrapPython
];
pythonPath = [
python3Packages.gitpython
];
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin $out/lib
cp ${./update.py} $out/bin/vim-plugins-updater
cp ${./get-plugins.nix} $out/bin/get-plugins.nix
# wrap python scripts
makeWrapperArgs+=( --prefix PATH : "${lib.makeBinPath [
nix nix-prefetch-git neovim-unwrapped nurl ]}" --prefix PYTHONPATH : "${./.}:${../../../../../maintainers/scripts/pluginupdate-py}" )
wrapPythonPrograms
'';
shellHook = ''
export PYTHONPATH=pkgs/applications/editors/vim/plugins:maintainers/scripts/pluginupdate-py:$PYTHONPATH
'';
meta.mainProgram = "vim-plugins-updater";
}