lol
1{ runtimeShell
2, symlinkJoin
3, writeShellScriptBin
4, npush
5}:
6
7let
8 runScript = writeShellScriptBin "run-npush" ''
9 set -euo pipefail
10 CWD=$(pwd)
11
12 if [ -d "./levels" ]; then
13 echo "Directory ./levels found; skipping levelset copy"
14 else
15 echo "Directory ./levels not found; copying the official levelset to the current directory"
16 mkdir -p ./levels
17 cp ${npush}/share/npush/levels/* levels/
18 chmod 644 levels/*
19 fi
20 echo "Now calling npush"
21 exec "${npush}/bin/npush"
22 '';
23in
24symlinkJoin {
25 name = "run-npush-${npush.version}";
26
27 paths = [
28 npush
29 runScript
30 ];
31}