1{ buildPythonApplication
2, nix
3, makeWrapper
4, python3Packages
5, lib
6# , nix-prefetch-git
7, nix-prefetch-scripts
8, luarocks-nix
9}:
10let
11
12 path = lib.makeBinPath [ nix nix-prefetch-scripts luarocks-nix ];
13in
14buildPythonApplication {
15 pname = "luarocks-packages-updater";
16 version = "0.1";
17
18 format = "other";
19
20 nativeBuildInputs = [
21 makeWrapper
22 python3Packages.wrapPython
23 ];
24 propagatedBuildInputs = [
25 python3Packages.gitpython
26 ];
27
28 dontUnpack = true;
29
30 installPhase =
31 ''
32 mkdir -p $out/bin $out/lib
33 cp ${./updater.py} $out/bin/luarocks-packages-updater
34 cp ${../../../../maintainers/scripts/pluginupdate.py} $out/lib/pluginupdate.py
35
36 # wrap python scripts
37 makeWrapperArgs+=( --prefix PATH : "${path}" --prefix PYTHONPATH : "$out/lib" )
38 wrapPythonProgramsIn "$out"
39 '';
40
41 shellHook = ''
42 export PYTHONPATH="maintainers/scripts:$PYTHONPATH"
43 export PATH="${path}:$PATH"
44 '';
45
46 meta.mainProgram = "luarocks-packages-updater";
47}
48
49