forked from rarias/bscpkgs
ds: add fast timetable generator
This commit is contained in:
23
garlic/ds/std/timetable.nix
Normal file
23
garlic/ds/std/timetable.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user