diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-31 22:19:45 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-31 22:19:45 +0100 |
commit | 78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc (patch) | |
tree | fd9cfb92edfaa37c919be8d24063b8a6c6d94c83 /nixpkgs/pkgs/development/lua-modules/updater/default.nix | |
parent | 7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769 (diff) | |
parent | 0cbe9f69c234a7700596e943bfae7ef27a31b735 (diff) | |
download | nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.gz nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.bz2 nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.lz nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.xz nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.zst nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.zip |
Merge commit '0cbe9f69c234a7700596e943bfae7ef27a31b735' into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/lua-modules/updater/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/lua-modules/updater/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/lua-modules/updater/default.nix b/nixpkgs/pkgs/development/lua-modules/updater/default.nix new file mode 100644 index 000000000000..40c93b21e831 --- /dev/null +++ b/nixpkgs/pkgs/development/lua-modules/updater/default.nix @@ -0,0 +1,49 @@ +{ buildPythonApplication +, nix +, makeWrapper +, python3Packages +, lib +# , nix-prefetch-git +, nix-prefetch-scripts +, luarocks-nix +}: +let + + path = lib.makeBinPath [ nix nix-prefetch-scripts luarocks-nix ]; +in +buildPythonApplication { + pname = "luarocks-packages-updater"; + version = "0.1"; + + format = "other"; + + nativeBuildInputs = [ + makeWrapper + python3Packages.wrapPython + ]; + propagatedBuildInputs = [ + python3Packages.gitpython + ]; + + dontUnpack = true; + + installPhase = + '' + mkdir -p $out/bin $out/lib + cp ${./updater.py} $out/bin/luarocks-packages-updater + cp ${../../../../maintainers/scripts/pluginupdate.py} $out/lib/pluginupdate.py + + # wrap python scripts + makeWrapperArgs+=( --prefix PATH : "${path}" --prefix PYTHONPATH : "$out/lib" ) + wrapPythonProgramsIn "$out" + ''; + + shellHook = '' + export PYTHONPATH="maintainers/scripts:$PYTHONPATH" + export PATH="${path}:$PATH" + ''; + + meta.mainProgram = "luarocks-packages-updater"; +} + + |