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