ds: add fast timetable generator

This commit is contained in:
2021-03-01 11:16:03 +01:00
parent 051a74b85d
commit 09a0348b0e
4 changed files with 108 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
{
stdenv
, python3
}:
resultTree:
stdenv.mkDerivation {
name = "timetable.json";
preferLocalBuild = true;
src = ./timetable.py;
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
cp $src timetable.py
'';
buildInputs = [ python3 ];
installPhase = ''
touch $out
python timetable.py ${resultTree} > $out
'';
}