define tuxstrap-crontab manual command

This commit is contained in:
2025-01-01 00:11:50 +02:00
parent 7332c751ca
commit 99f1b28bf9

View File

@@ -6,20 +6,18 @@ pkgs.stdenv.mkDerivation {
unpackPhase = '' unpackPhase = ''
mkdir -p $out mkdir -p $out
cp $src tuxstrap-crontab.bin '';
buildPhase = ''
mkdir -p $out
mkdir -p $out/lib
cp $src $out/lib/crontab-executable.ts
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
mkdir -p $out/lib echo "#!/bin/bash" > $out/bin/tuxstrap-crontab
echo '${"#"}!/bin/bash' > $out/bin/tuxstrap-crontab echo '${pkgs.bun}/bin/bun run $(dirname "$(realpath "$0")")/../lib/crontab-executable.ts' >> $out/bin/tuxstrap-crontab
echo '${pkgs.bun}/bin/bun run $out/lib/crontab-executable.ts' >> $out/bin/tuxstrap-crontab chmod +x $out/bin/tuxstrap-crontab
chmod +x $out/bin/tuxstrap-crontab
mv crontab-executable $out/lib/
''; '';
meta = with nixpkgs.lib; {
description = "tuxstrap crontab executable";
};
} }