Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 60 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonApplication, 4 makeWrapper, 5 nix, 6 nix-prefetch-git, 7 nurl, 8 python3Packages, 9 vimPluginsUpdater, 10 writeShellScript, 11 12 # optional 13 neovim-unwrapped, 14}: 15buildPythonApplication { 16 pname = "vim-plugins-updater"; 17 version = "0.1"; 18 19 format = "other"; 20 21 nativeBuildInputs = [ 22 makeWrapper 23 python3Packages.wrapPython 24 ]; 25 26 pythonPath = [ 27 python3Packages.gitpython 28 python3Packages.requests 29 ]; 30 31 dontUnpack = true; 32 33 installPhase = '' 34 mkdir -p $out/bin $out/lib 35 cp ${./update.py} $out/bin/vim-plugins-updater 36 cp ${./get-plugins.nix} $out/bin/get-plugins.nix 37 38 # wrap python scripts 39 makeWrapperArgs+=( --prefix PATH : "${ 40 lib.makeBinPath [ 41 nix 42 nix-prefetch-git 43 neovim-unwrapped 44 nurl 45 ] 46 }" --prefix PYTHONPATH : "${./.}:${../../../../../../maintainers/scripts/pluginupdate-py}" ) 47 wrapPythonPrograms 48 ''; 49 50 shellHook = '' 51 export PYTHONPATH=pkgs/applications/editors/vim/plugins:maintainers/scripts/pluginupdate-py:$PYTHONPATH 52 ''; 53 54 passthru.updateScript = writeShellScript "updateScript" '' 55 # don't saturate the update bot connection 56 ${lib.getExe vimPluginsUpdater} --proc 2 update 57 ''; 58 59 meta.mainProgram = "vim-plugins-updater"; 60}