Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 68 lines 1.2 kB view raw
1{ buildPythonApplication 2, nix 3, makeWrapper 4, python3Packages 5, lib 6# , nix-prefetch-git 7, nix-prefetch-scripts 8, luarocks-nix 9, lua5_1 10, lua5_2 11, lua5_3 12, lua5_4 13}: 14let 15 16 path = lib.makeBinPath [ 17 nix nix-prefetch-scripts luarocks-nix 18 ]; 19 20 luaversions = [ 21 lua5_1 22 lua5_2 23 lua5_3 24 lua5_4 25 ]; 26 27in 28buildPythonApplication { 29 pname = "luarocks-packages-updater"; 30 version = "0.1"; 31 32 format = "other"; 33 34 nativeBuildInputs = [ 35 makeWrapper 36 python3Packages.wrapPython 37 ]; 38 propagatedBuildInputs = [ 39 python3Packages.gitpython 40 ]; 41 42 dontUnpack = true; 43 44 installPhase = 45 '' 46 mkdir -p $out/bin $out/lib 47 cp ${./updater.py} $out/bin/luarocks-packages-updater 48 cp ${../../../../maintainers/scripts/pluginupdate.py} $out/lib/pluginupdate.py 49 50 # wrap python scripts 51 makeWrapperArgs+=( --prefix PATH : "${path}" --prefix PYTHONPATH : "$out/lib" \ 52 --set LUA_51 ${lua5_1} \ 53 --set LUA_52 ${lua5_2} \ 54 --set LUA_53 ${lua5_3} \ 55 --set LUA_54 ${lua5_4} 56 ) 57 wrapPythonProgramsIn "$out" 58 ''; 59 60 shellHook = '' 61 export PYTHONPATH="maintainers/scripts:$PYTHONPATH" 62 export PATH="${path}:$PATH" 63 ''; 64 65 meta.mainProgram = "luarocks-packages-updater"; 66} 67 68